mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-5319f1ba23b5304e/out/
avssuas.rs

1#![doc = "MAVLink AVSSUAS dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 2u8;
25pub const DIALECT_NUMBER: u8 = 1u8;
26#[cfg_attr(feature = "ts", derive(TS))]
27#[cfg_attr(feature = "ts", ts(export))]
28#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
29#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30#[cfg_attr(feature = "serde", serde(tag = "type"))]
31#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32#[repr(u32)]
33#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
34pub enum ActuatorConfiguration {
35    #[doc = "Do nothing."]
36    ACTUATOR_CONFIGURATION_NONE = 0,
37    #[doc = "Command the actuator to beep now."]
38    ACTUATOR_CONFIGURATION_BEEP = 1,
39    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
41    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
42    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
45    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
46    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
47}
48impl ActuatorConfiguration {
49    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
50}
51impl Default for ActuatorConfiguration {
52    fn default() -> Self {
53        Self::DEFAULT
54    }
55}
56#[cfg_attr(feature = "ts", derive(TS))]
57#[cfg_attr(feature = "ts", ts(export))]
58#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
59#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
60#[cfg_attr(feature = "serde", serde(tag = "type"))]
61#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
62#[repr(u32)]
63#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
64pub enum ActuatorOutputFunction {
65    #[doc = "No function (disabled)."]
66    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
67    #[doc = "Motor 1"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
69    #[doc = "Motor 2"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
71    #[doc = "Motor 3"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
73    #[doc = "Motor 4"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
75    #[doc = "Motor 5"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
77    #[doc = "Motor 6"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
79    #[doc = "Motor 7"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
81    #[doc = "Motor 8"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
83    #[doc = "Motor 9"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
85    #[doc = "Motor 10"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
87    #[doc = "Motor 11"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
89    #[doc = "Motor 12"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
91    #[doc = "Motor 13"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
93    #[doc = "Motor 14"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
95    #[doc = "Motor 15"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
97    #[doc = "Motor 16"]
98    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
99    #[doc = "Servo 1"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
101    #[doc = "Servo 2"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
103    #[doc = "Servo 3"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
105    #[doc = "Servo 4"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
107    #[doc = "Servo 5"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
109    #[doc = "Servo 6"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
111    #[doc = "Servo 7"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
113    #[doc = "Servo 8"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
115    #[doc = "Servo 9"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
117    #[doc = "Servo 10"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
119    #[doc = "Servo 11"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
121    #[doc = "Servo 12"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
123    #[doc = "Servo 13"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
125    #[doc = "Servo 14"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
127    #[doc = "Servo 15"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
129    #[doc = "Servo 16"]
130    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
131}
132impl ActuatorOutputFunction {
133    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
134}
135impl Default for ActuatorOutputFunction {
136    fn default() -> Self {
137        Self::DEFAULT
138    }
139}
140#[cfg_attr(feature = "ts", derive(TS))]
141#[cfg_attr(feature = "ts", ts(export))]
142#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
144#[cfg_attr(feature = "serde", serde(tag = "type"))]
145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
146#[repr(u32)]
147#[doc = "Enumeration of the ADSB altimeter types"]
148pub enum AdsbAltitudeType {
149    #[doc = "Altitude reported from a Baro source using QNH reference"]
150    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
151    #[doc = "Altitude reported from a GNSS source"]
152    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
153}
154impl AdsbAltitudeType {
155    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
156}
157impl Default for AdsbAltitudeType {
158    fn default() -> Self {
159        Self::DEFAULT
160    }
161}
162#[cfg_attr(feature = "ts", derive(TS))]
163#[cfg_attr(feature = "ts", ts(export))]
164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
166#[cfg_attr(feature = "serde", serde(tag = "type"))]
167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
168#[repr(u32)]
169#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
170pub enum AdsbEmitterType {
171    ADSB_EMITTER_TYPE_NO_INFO = 0,
172    ADSB_EMITTER_TYPE_LIGHT = 1,
173    ADSB_EMITTER_TYPE_SMALL = 2,
174    ADSB_EMITTER_TYPE_LARGE = 3,
175    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
176    ADSB_EMITTER_TYPE_HEAVY = 5,
177    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
178    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
179    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
180    ADSB_EMITTER_TYPE_GLIDER = 9,
181    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
182    ADSB_EMITTER_TYPE_PARACHUTE = 11,
183    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
184    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
185    ADSB_EMITTER_TYPE_UAV = 14,
186    ADSB_EMITTER_TYPE_SPACE = 15,
187    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
188    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
189    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
190    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
191}
192impl AdsbEmitterType {
193    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
194}
195impl Default for AdsbEmitterType {
196    fn default() -> Self {
197        Self::DEFAULT
198    }
199}
200bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
201impl AdsbFlags {
202    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
203}
204impl Default for AdsbFlags {
205    fn default() -> Self {
206        Self::DEFAULT
207    }
208}
209bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
210impl AisFlags {
211    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
212}
213impl Default for AisFlags {
214    fn default() -> Self {
215        Self::DEFAULT
216    }
217}
218#[cfg_attr(feature = "ts", derive(TS))]
219#[cfg_attr(feature = "ts", ts(export))]
220#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
222#[cfg_attr(feature = "serde", serde(tag = "type"))]
223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
224#[repr(u32)]
225#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
226pub enum AisNavStatus {
227    #[doc = "Under way using engine."]
228    UNDER_WAY = 0,
229    AIS_NAV_ANCHORED = 1,
230    AIS_NAV_UN_COMMANDED = 2,
231    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
232    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
233    AIS_NAV_MOORED = 5,
234    AIS_NAV_AGROUND = 6,
235    AIS_NAV_FISHING = 7,
236    AIS_NAV_SAILING = 8,
237    AIS_NAV_RESERVED_HSC = 9,
238    AIS_NAV_RESERVED_WIG = 10,
239    AIS_NAV_RESERVED_1 = 11,
240    AIS_NAV_RESERVED_2 = 12,
241    AIS_NAV_RESERVED_3 = 13,
242    #[doc = "Search And Rescue Transponder."]
243    AIS_NAV_AIS_SART = 14,
244    #[doc = "Not available (default)."]
245    AIS_NAV_UNKNOWN = 15,
246}
247impl AisNavStatus {
248    pub const DEFAULT: Self = Self::UNDER_WAY;
249}
250impl Default for AisNavStatus {
251    fn default() -> Self {
252        Self::DEFAULT
253    }
254}
255#[cfg_attr(feature = "ts", derive(TS))]
256#[cfg_attr(feature = "ts", ts(export))]
257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
259#[cfg_attr(feature = "serde", serde(tag = "type"))]
260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
261#[repr(u32)]
262#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
263pub enum AisType {
264    #[doc = "Not available (default)."]
265    AIS_TYPE_UNKNOWN = 0,
266    AIS_TYPE_RESERVED_1 = 1,
267    AIS_TYPE_RESERVED_2 = 2,
268    AIS_TYPE_RESERVED_3 = 3,
269    AIS_TYPE_RESERVED_4 = 4,
270    AIS_TYPE_RESERVED_5 = 5,
271    AIS_TYPE_RESERVED_6 = 6,
272    AIS_TYPE_RESERVED_7 = 7,
273    AIS_TYPE_RESERVED_8 = 8,
274    AIS_TYPE_RESERVED_9 = 9,
275    AIS_TYPE_RESERVED_10 = 10,
276    AIS_TYPE_RESERVED_11 = 11,
277    AIS_TYPE_RESERVED_12 = 12,
278    AIS_TYPE_RESERVED_13 = 13,
279    AIS_TYPE_RESERVED_14 = 14,
280    AIS_TYPE_RESERVED_15 = 15,
281    AIS_TYPE_RESERVED_16 = 16,
282    AIS_TYPE_RESERVED_17 = 17,
283    AIS_TYPE_RESERVED_18 = 18,
284    AIS_TYPE_RESERVED_19 = 19,
285    #[doc = "Wing In Ground effect."]
286    AIS_TYPE_WIG = 20,
287    AIS_TYPE_WIG_HAZARDOUS_A = 21,
288    AIS_TYPE_WIG_HAZARDOUS_B = 22,
289    AIS_TYPE_WIG_HAZARDOUS_C = 23,
290    AIS_TYPE_WIG_HAZARDOUS_D = 24,
291    AIS_TYPE_WIG_RESERVED_1 = 25,
292    AIS_TYPE_WIG_RESERVED_2 = 26,
293    AIS_TYPE_WIG_RESERVED_3 = 27,
294    AIS_TYPE_WIG_RESERVED_4 = 28,
295    AIS_TYPE_WIG_RESERVED_5 = 29,
296    AIS_TYPE_FISHING = 30,
297    AIS_TYPE_TOWING = 31,
298    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
299    AIS_TYPE_TOWING_LARGE = 32,
300    #[doc = "Dredging or other underwater ops."]
301    AIS_TYPE_DREDGING = 33,
302    AIS_TYPE_DIVING = 34,
303    AIS_TYPE_MILITARY = 35,
304    AIS_TYPE_SAILING = 36,
305    AIS_TYPE_PLEASURE = 37,
306    AIS_TYPE_RESERVED_20 = 38,
307    AIS_TYPE_RESERVED_21 = 39,
308    #[doc = "High Speed Craft."]
309    AIS_TYPE_HSC = 40,
310    AIS_TYPE_HSC_HAZARDOUS_A = 41,
311    AIS_TYPE_HSC_HAZARDOUS_B = 42,
312    AIS_TYPE_HSC_HAZARDOUS_C = 43,
313    AIS_TYPE_HSC_HAZARDOUS_D = 44,
314    AIS_TYPE_HSC_RESERVED_1 = 45,
315    AIS_TYPE_HSC_RESERVED_2 = 46,
316    AIS_TYPE_HSC_RESERVED_3 = 47,
317    AIS_TYPE_HSC_RESERVED_4 = 48,
318    AIS_TYPE_HSC_UNKNOWN = 49,
319    AIS_TYPE_PILOT = 50,
320    #[doc = "Search And Rescue vessel."]
321    AIS_TYPE_SAR = 51,
322    AIS_TYPE_TUG = 52,
323    AIS_TYPE_PORT_TENDER = 53,
324    #[doc = "Anti-pollution equipment."]
325    AIS_TYPE_ANTI_POLLUTION = 54,
326    AIS_TYPE_LAW_ENFORCEMENT = 55,
327    AIS_TYPE_SPARE_LOCAL_1 = 56,
328    AIS_TYPE_SPARE_LOCAL_2 = 57,
329    AIS_TYPE_MEDICAL_TRANSPORT = 58,
330    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
331    AIS_TYPE_NONECOMBATANT = 59,
332    AIS_TYPE_PASSENGER = 60,
333    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
334    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
335    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
336    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
337    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
338    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
339    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
340    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
341    AIS_TYPE_PASSENGER_UNKNOWN = 69,
342    AIS_TYPE_CARGO = 70,
343    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
344    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
345    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
346    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
347    AIS_TYPE_CARGO_RESERVED_1 = 75,
348    AIS_TYPE_CARGO_RESERVED_2 = 76,
349    AIS_TYPE_CARGO_RESERVED_3 = 77,
350    AIS_TYPE_CARGO_RESERVED_4 = 78,
351    AIS_TYPE_CARGO_UNKNOWN = 79,
352    AIS_TYPE_TANKER = 80,
353    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
354    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
355    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
356    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
357    AIS_TYPE_TANKER_RESERVED_1 = 85,
358    AIS_TYPE_TANKER_RESERVED_2 = 86,
359    AIS_TYPE_TANKER_RESERVED_3 = 87,
360    AIS_TYPE_TANKER_RESERVED_4 = 88,
361    AIS_TYPE_TANKER_UNKNOWN = 89,
362    AIS_TYPE_OTHER = 90,
363    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
364    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
365    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
366    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
367    AIS_TYPE_OTHER_RESERVED_1 = 95,
368    AIS_TYPE_OTHER_RESERVED_2 = 96,
369    AIS_TYPE_OTHER_RESERVED_3 = 97,
370    AIS_TYPE_OTHER_RESERVED_4 = 98,
371    AIS_TYPE_OTHER_UNKNOWN = 99,
372}
373impl AisType {
374    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
375}
376impl Default for AisType {
377    fn default() -> Self {
378        Self::DEFAULT
379    }
380}
381bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
382impl AttitudeTargetTypemask {
383    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
384}
385impl Default for AttitudeTargetTypemask {
386    fn default() -> Self {
387        Self::DEFAULT
388    }
389}
390#[cfg_attr(feature = "ts", derive(TS))]
391#[cfg_attr(feature = "ts", ts(export))]
392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
394#[cfg_attr(feature = "serde", serde(tag = "type"))]
395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
396#[repr(u32)]
397#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
398pub enum AutotuneAxis {
399    #[doc = "Autotune roll axis."]
400    AUTOTUNE_AXIS_ROLL = 1,
401    #[doc = "Autotune pitch axis."]
402    AUTOTUNE_AXIS_PITCH = 2,
403    #[doc = "Autotune yaw axis."]
404    AUTOTUNE_AXIS_YAW = 4,
405}
406impl AutotuneAxis {
407    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
408}
409impl Default for AutotuneAxis {
410    fn default() -> Self {
411        Self::DEFAULT
412    }
413}
414#[cfg_attr(feature = "ts", derive(TS))]
415#[cfg_attr(feature = "ts", ts(export))]
416#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
418#[cfg_attr(feature = "serde", serde(tag = "type"))]
419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
420#[repr(u32)]
421pub enum AvssHorseflyOperationMode {
422    #[doc = "In manual control mode"]
423    MODE_HORSEFLY_MANUAL_CTRL = 0,
424    #[doc = "In auto takeoff mode"]
425    MODE_HORSEFLY_AUTO_TAKEOFF = 1,
426    #[doc = "In auto landing mode"]
427    MODE_HORSEFLY_AUTO_LANDING = 2,
428    #[doc = "In go home mode"]
429    MODE_HORSEFLY_NAVI_GO_HOME = 3,
430    #[doc = "In drop mode"]
431    MODE_HORSEFLY_DROP = 4,
432}
433impl AvssHorseflyOperationMode {
434    pub const DEFAULT: Self = Self::MODE_HORSEFLY_MANUAL_CTRL;
435}
436impl Default for AvssHorseflyOperationMode {
437    fn default() -> Self {
438        Self::DEFAULT
439    }
440}
441#[cfg_attr(feature = "ts", derive(TS))]
442#[cfg_attr(feature = "ts", ts(export))]
443#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
445#[cfg_attr(feature = "serde", serde(tag = "type"))]
446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
447#[repr(u32)]
448pub enum AvssM300OperationMode {
449    #[doc = "In manual control mode"]
450    MODE_M300_MANUAL_CTRL = 0,
451    #[doc = "In attitude mode"]
452    MODE_M300_ATTITUDE = 1,
453    #[doc = "In GPS mode"]
454    MODE_M300_P_GPS = 6,
455    #[doc = "In hotpoint mode"]
456    MODE_M300_HOTPOINT_MODE = 9,
457    #[doc = "In assisted takeoff mode"]
458    MODE_M300_ASSISTED_TAKEOFF = 10,
459    #[doc = "In auto takeoff mode"]
460    MODE_M300_AUTO_TAKEOFF = 11,
461    #[doc = "In auto landing mode"]
462    MODE_M300_AUTO_LANDING = 12,
463    #[doc = "In go home mode"]
464    MODE_M300_NAVI_GO_HOME = 15,
465    #[doc = "In sdk control mode"]
466    MODE_M300_NAVI_SDK_CTRL = 17,
467    #[doc = "In sport mode"]
468    MODE_M300_S_SPORT = 31,
469    #[doc = "In force auto landing mode"]
470    MODE_M300_FORCE_AUTO_LANDING = 33,
471    #[doc = "In tripod mode"]
472    MODE_M300_T_TRIPOD = 38,
473    #[doc = "In search mode"]
474    MODE_M300_SEARCH_MODE = 40,
475    #[doc = "In engine mode"]
476    MODE_M300_ENGINE_START = 41,
477}
478impl AvssM300OperationMode {
479    pub const DEFAULT: Self = Self::MODE_M300_MANUAL_CTRL;
480}
481impl Default for AvssM300OperationMode {
482    fn default() -> Self {
483        Self::DEFAULT
484    }
485}
486bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
487impl CameraCapFlags {
488    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
489}
490impl Default for CameraCapFlags {
491    fn default() -> Self {
492        Self::DEFAULT
493    }
494}
495#[cfg_attr(feature = "ts", derive(TS))]
496#[cfg_attr(feature = "ts", ts(export))]
497#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
499#[cfg_attr(feature = "serde", serde(tag = "type"))]
500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
501#[repr(u32)]
502#[doc = "Camera Modes."]
503pub enum CameraMode {
504    #[doc = "Camera is in image/photo capture mode."]
505    CAMERA_MODE_IMAGE = 0,
506    #[doc = "Camera is in video capture mode."]
507    CAMERA_MODE_VIDEO = 1,
508    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
509    CAMERA_MODE_IMAGE_SURVEY = 2,
510}
511impl CameraMode {
512    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
513}
514impl Default for CameraMode {
515    fn default() -> Self {
516        Self::DEFAULT
517    }
518}
519#[cfg_attr(feature = "ts", derive(TS))]
520#[cfg_attr(feature = "ts", ts(export))]
521#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
523#[cfg_attr(feature = "serde", serde(tag = "type"))]
524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
525#[repr(u32)]
526#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
527pub enum CameraSource {
528    #[doc = "Default camera source."]
529    CAMERA_SOURCE_DEFAULT = 0,
530    #[doc = "RGB camera source."]
531    CAMERA_SOURCE_RGB = 1,
532    #[doc = "IR camera source."]
533    CAMERA_SOURCE_IR = 2,
534    #[doc = "NDVI camera source."]
535    CAMERA_SOURCE_NDVI = 3,
536}
537impl CameraSource {
538    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
539}
540impl Default for CameraSource {
541    fn default() -> Self {
542        Self::DEFAULT
543    }
544}
545#[cfg_attr(feature = "ts", derive(TS))]
546#[cfg_attr(feature = "ts", ts(export))]
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Camera tracking modes"]
553pub enum CameraTrackingMode {
554    #[doc = "Not tracking"]
555    CAMERA_TRACKING_MODE_NONE = 0,
556    #[doc = "Target is a point"]
557    CAMERA_TRACKING_MODE_POINT = 1,
558    #[doc = "Target is a rectangle"]
559    CAMERA_TRACKING_MODE_RECTANGLE = 2,
560}
561impl CameraTrackingMode {
562    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
563}
564impl Default for CameraTrackingMode {
565    fn default() -> Self {
566        Self::DEFAULT
567    }
568}
569#[cfg_attr(feature = "ts", derive(TS))]
570#[cfg_attr(feature = "ts", ts(export))]
571#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
573#[cfg_attr(feature = "serde", serde(tag = "type"))]
574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
575#[repr(u32)]
576#[doc = "Camera tracking status flags"]
577pub enum CameraTrackingStatusFlags {
578    #[doc = "Camera is not tracking"]
579    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
580    #[doc = "Camera is tracking"]
581    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
582    #[doc = "Camera tracking in error state"]
583    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
584}
585impl CameraTrackingStatusFlags {
586    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
587}
588impl Default for CameraTrackingStatusFlags {
589    fn default() -> Self {
590        Self::DEFAULT
591    }
592}
593bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
594impl CameraTrackingTargetData {
595    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
596}
597impl Default for CameraTrackingTargetData {
598    fn default() -> Self {
599        Self::DEFAULT
600    }
601}
602#[cfg_attr(feature = "ts", derive(TS))]
603#[cfg_attr(feature = "ts", ts(export))]
604#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
606#[cfg_attr(feature = "serde", serde(tag = "type"))]
607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
608#[repr(u32)]
609#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
610pub enum CameraZoomType {
611    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
612    ZOOM_TYPE_STEP = 0,
613    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
614    ZOOM_TYPE_CONTINUOUS = 1,
615    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
616    ZOOM_TYPE_RANGE = 2,
617    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
618    ZOOM_TYPE_FOCAL_LENGTH = 3,
619    #[doc = "Zoom value as horizontal field of view in degrees."]
620    ZOOM_TYPE_HORIZONTAL_FOV = 4,
621}
622impl CameraZoomType {
623    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
624}
625impl Default for CameraZoomType {
626    fn default() -> Self {
627        Self::DEFAULT
628    }
629}
630#[cfg_attr(feature = "ts", derive(TS))]
631#[cfg_attr(feature = "ts", ts(export))]
632#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
634#[cfg_attr(feature = "serde", serde(tag = "type"))]
635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
636#[repr(u32)]
637pub enum CanFilterOp {
638    CAN_FILTER_REPLACE = 0,
639    CAN_FILTER_ADD = 1,
640    CAN_FILTER_REMOVE = 2,
641}
642impl CanFilterOp {
643    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
644}
645impl Default for CanFilterOp {
646    fn default() -> Self {
647        Self::DEFAULT
648    }
649}
650#[cfg_attr(feature = "ts", derive(TS))]
651#[cfg_attr(feature = "ts", ts(export))]
652#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
654#[cfg_attr(feature = "serde", serde(tag = "type"))]
655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
656#[repr(u32)]
657#[doc = "Possible responses from a CELLULAR_CONFIG message."]
658pub enum CellularConfigResponse {
659    #[doc = "Changes accepted."]
660    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
661    #[doc = "Invalid APN."]
662    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
663    #[doc = "Invalid PIN."]
664    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
665    #[doc = "Changes rejected."]
666    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
667    #[doc = "PUK is required to unblock SIM card."]
668    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
669}
670impl CellularConfigResponse {
671    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
672}
673impl Default for CellularConfigResponse {
674    fn default() -> Self {
675        Self::DEFAULT
676    }
677}
678#[cfg_attr(feature = "ts", derive(TS))]
679#[cfg_attr(feature = "ts", ts(export))]
680#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
682#[cfg_attr(feature = "serde", serde(tag = "type"))]
683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
684#[repr(u32)]
685#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
686pub enum CellularNetworkFailedReason {
687    #[doc = "No error"]
688    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
689    #[doc = "Error state is unknown"]
690    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
691    #[doc = "SIM is required for the modem but missing"]
692    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
693    #[doc = "SIM is available, but not usable for connection"]
694    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
695}
696impl CellularNetworkFailedReason {
697    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
698}
699impl Default for CellularNetworkFailedReason {
700    fn default() -> Self {
701        Self::DEFAULT
702    }
703}
704#[cfg_attr(feature = "ts", derive(TS))]
705#[cfg_attr(feature = "ts", ts(export))]
706#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
708#[cfg_attr(feature = "serde", serde(tag = "type"))]
709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
710#[repr(u32)]
711#[doc = "Cellular network radio type"]
712pub enum CellularNetworkRadioType {
713    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
714    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
715    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
716    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
717    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
718}
719impl CellularNetworkRadioType {
720    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
721}
722impl Default for CellularNetworkRadioType {
723    fn default() -> Self {
724        Self::DEFAULT
725    }
726}
727#[cfg_attr(feature = "ts", derive(TS))]
728#[cfg_attr(feature = "ts", ts(export))]
729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
731#[cfg_attr(feature = "serde", serde(tag = "type"))]
732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
733#[repr(u32)]
734#[doc = "These flags encode the cellular network status"]
735pub enum CellularStatusFlag {
736    #[doc = "State unknown or not reportable."]
737    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
738    #[doc = "Modem is unusable"]
739    CELLULAR_STATUS_FLAG_FAILED = 1,
740    #[doc = "Modem is being initialized"]
741    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
742    #[doc = "Modem is locked"]
743    CELLULAR_STATUS_FLAG_LOCKED = 3,
744    #[doc = "Modem is not enabled and is powered down"]
745    CELLULAR_STATUS_FLAG_DISABLED = 4,
746    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
747    CELLULAR_STATUS_FLAG_DISABLING = 5,
748    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
749    CELLULAR_STATUS_FLAG_ENABLING = 6,
750    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
751    CELLULAR_STATUS_FLAG_ENABLED = 7,
752    #[doc = "Modem is searching for a network provider to register"]
753    CELLULAR_STATUS_FLAG_SEARCHING = 8,
754    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
755    CELLULAR_STATUS_FLAG_REGISTERED = 9,
756    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
757    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
758    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
759    CELLULAR_STATUS_FLAG_CONNECTING = 11,
760    #[doc = "One or more packet data bearers is active and connected"]
761    CELLULAR_STATUS_FLAG_CONNECTED = 12,
762}
763impl CellularStatusFlag {
764    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
765}
766impl Default for CellularStatusFlag {
767    fn default() -> Self {
768        Self::DEFAULT
769    }
770}
771#[cfg_attr(feature = "ts", derive(TS))]
772#[cfg_attr(feature = "ts", ts(export))]
773#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
775#[cfg_attr(feature = "serde", serde(tag = "type"))]
776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
777#[repr(u32)]
778#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
779pub enum CompMetadataType {
780    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
781    COMP_METADATA_TYPE_GENERAL = 0,
782    #[doc = "Parameter meta data."]
783    COMP_METADATA_TYPE_PARAMETER = 1,
784    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
785    COMP_METADATA_TYPE_COMMANDS = 2,
786    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
787    COMP_METADATA_TYPE_PERIPHERALS = 3,
788    #[doc = "Meta data for the events interface."]
789    COMP_METADATA_TYPE_EVENTS = 4,
790    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
791    COMP_METADATA_TYPE_ACTUATORS = 5,
792}
793impl CompMetadataType {
794    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
795}
796impl Default for CompMetadataType {
797    fn default() -> Self {
798        Self::DEFAULT
799    }
800}
801#[cfg_attr(feature = "ts", derive(TS))]
802#[cfg_attr(feature = "ts", ts(export))]
803#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
805#[cfg_attr(feature = "serde", serde(tag = "type"))]
806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
807#[repr(u32)]
808#[doc = "Indicates the ESC connection type."]
809pub enum EscConnectionType {
810    #[doc = "Traditional PPM ESC."]
811    ESC_CONNECTION_TYPE_PPM = 0,
812    #[doc = "Serial Bus connected ESC."]
813    ESC_CONNECTION_TYPE_SERIAL = 1,
814    #[doc = "One Shot PPM ESC."]
815    ESC_CONNECTION_TYPE_ONESHOT = 2,
816    #[doc = "I2C ESC."]
817    ESC_CONNECTION_TYPE_I2C = 3,
818    #[doc = "CAN-Bus ESC."]
819    ESC_CONNECTION_TYPE_CAN = 4,
820    #[doc = "DShot ESC."]
821    ESC_CONNECTION_TYPE_DSHOT = 5,
822}
823impl EscConnectionType {
824    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
825}
826impl Default for EscConnectionType {
827    fn default() -> Self {
828        Self::DEFAULT
829    }
830}
831bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
832impl EscFailureFlags {
833    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
834}
835impl Default for EscFailureFlags {
836    fn default() -> Self {
837        Self::DEFAULT
838    }
839}
840bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
841impl EstimatorStatusFlags {
842    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
843}
844impl Default for EstimatorStatusFlags {
845    fn default() -> Self {
846        Self::DEFAULT
847    }
848}
849#[cfg_attr(feature = "ts", derive(TS))]
850#[cfg_attr(feature = "ts", ts(export))]
851#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
853#[cfg_attr(feature = "serde", serde(tag = "type"))]
854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
855#[repr(u32)]
856#[doc = "List of possible failure type to inject."]
857pub enum FailureType {
858    #[doc = "No failure injected, used to reset a previous failure."]
859    FAILURE_TYPE_OK = 0,
860    #[doc = "Sets unit off, so completely non-responsive."]
861    FAILURE_TYPE_OFF = 1,
862    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
863    FAILURE_TYPE_STUCK = 2,
864    #[doc = "Unit is reporting complete garbage."]
865    FAILURE_TYPE_GARBAGE = 3,
866    #[doc = "Unit is consistently wrong."]
867    FAILURE_TYPE_WRONG = 4,
868    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
869    FAILURE_TYPE_SLOW = 5,
870    #[doc = "Data of unit is delayed in time."]
871    FAILURE_TYPE_DELAYED = 6,
872    #[doc = "Unit is sometimes working, sometimes not."]
873    FAILURE_TYPE_INTERMITTENT = 7,
874}
875impl FailureType {
876    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
877}
878impl Default for FailureType {
879    fn default() -> Self {
880        Self::DEFAULT
881    }
882}
883#[cfg_attr(feature = "ts", derive(TS))]
884#[cfg_attr(feature = "ts", ts(export))]
885#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
887#[cfg_attr(feature = "serde", serde(tag = "type"))]
888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
889#[repr(u32)]
890#[doc = "List of possible units where failures can be injected."]
891pub enum FailureUnit {
892    FAILURE_UNIT_SENSOR_GYRO = 0,
893    FAILURE_UNIT_SENSOR_ACCEL = 1,
894    FAILURE_UNIT_SENSOR_MAG = 2,
895    FAILURE_UNIT_SENSOR_BARO = 3,
896    FAILURE_UNIT_SENSOR_GPS = 4,
897    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
898    FAILURE_UNIT_SENSOR_VIO = 6,
899    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
900    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
901    FAILURE_UNIT_SYSTEM_BATTERY = 100,
902    FAILURE_UNIT_SYSTEM_MOTOR = 101,
903    FAILURE_UNIT_SYSTEM_SERVO = 102,
904    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
905    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
906    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
907}
908impl FailureUnit {
909    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
910}
911impl Default for FailureUnit {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923pub enum FenceBreach {
924    #[doc = "No last fence breach"]
925    FENCE_BREACH_NONE = 0,
926    #[doc = "Breached minimum altitude"]
927    FENCE_BREACH_MINALT = 1,
928    #[doc = "Breached maximum altitude"]
929    FENCE_BREACH_MAXALT = 2,
930    #[doc = "Breached fence boundary"]
931    FENCE_BREACH_BOUNDARY = 3,
932}
933impl FenceBreach {
934    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
935}
936impl Default for FenceBreach {
937    fn default() -> Self {
938        Self::DEFAULT
939    }
940}
941#[cfg_attr(feature = "ts", derive(TS))]
942#[cfg_attr(feature = "ts", ts(export))]
943#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
945#[cfg_attr(feature = "serde", serde(tag = "type"))]
946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
947#[repr(u32)]
948#[doc = "Actions being taken to mitigate/prevent fence breach"]
949pub enum FenceMitigate {
950    #[doc = "Unknown"]
951    FENCE_MITIGATE_UNKNOWN = 0,
952    #[doc = "No actions being taken"]
953    FENCE_MITIGATE_NONE = 1,
954    #[doc = "Velocity limiting active to prevent breach"]
955    FENCE_MITIGATE_VEL_LIMIT = 2,
956}
957impl FenceMitigate {
958    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
959}
960impl Default for FenceMitigate {
961    fn default() -> Self {
962        Self::DEFAULT
963    }
964}
965#[cfg_attr(feature = "ts", derive(TS))]
966#[cfg_attr(feature = "ts", ts(export))]
967#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
968#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
969#[cfg_attr(feature = "serde", serde(tag = "type"))]
970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
971#[repr(u32)]
972#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
973pub enum FenceType {
974    #[doc = "Maximum altitude fence"]
975    FENCE_TYPE_ALT_MAX = 1,
976    #[doc = "Circle fence"]
977    FENCE_TYPE_CIRCLE = 2,
978    #[doc = "Polygon fence"]
979    FENCE_TYPE_POLYGON = 4,
980    #[doc = "Minimum altitude fence"]
981    FENCE_TYPE_ALT_MIN = 8,
982}
983impl FenceType {
984    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
985}
986impl Default for FenceType {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
999pub enum FirmwareVersionType {
1000    #[doc = "development release"]
1001    FIRMWARE_VERSION_TYPE_DEV = 0,
1002    #[doc = "alpha release"]
1003    FIRMWARE_VERSION_TYPE_ALPHA = 64,
1004    #[doc = "beta release"]
1005    FIRMWARE_VERSION_TYPE_BETA = 128,
1006    #[doc = "release candidate"]
1007    FIRMWARE_VERSION_TYPE_RC = 192,
1008    #[doc = "official stable release"]
1009    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
1010}
1011impl FirmwareVersionType {
1012    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
1013}
1014impl Default for FirmwareVersionType {
1015    fn default() -> Self {
1016        Self::DEFAULT
1017    }
1018}
1019bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
1020impl GimbalDeviceCapFlags {
1021    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
1022}
1023impl Default for GimbalDeviceCapFlags {
1024    fn default() -> Self {
1025        Self::DEFAULT
1026    }
1027}
1028bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
1029impl GimbalDeviceErrorFlags {
1030    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
1031}
1032impl Default for GimbalDeviceErrorFlags {
1033    fn default() -> Self {
1034        Self::DEFAULT
1035    }
1036}
1037bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
1038impl GimbalDeviceFlags {
1039    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
1040}
1041impl Default for GimbalDeviceFlags {
1042    fn default() -> Self {
1043        Self::DEFAULT
1044    }
1045}
1046bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
1047impl GimbalManagerCapFlags {
1048    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
1049}
1050impl Default for GimbalManagerCapFlags {
1051    fn default() -> Self {
1052        Self::DEFAULT
1053    }
1054}
1055bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1056impl GimbalManagerFlags {
1057    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1058}
1059impl Default for GimbalManagerFlags {
1060    fn default() -> Self {
1061        Self::DEFAULT
1062    }
1063}
1064#[cfg_attr(feature = "ts", derive(TS))]
1065#[cfg_attr(feature = "ts", ts(export))]
1066#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1068#[cfg_attr(feature = "serde", serde(tag = "type"))]
1069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1070#[repr(u32)]
1071#[doc = "Type of GPS fix"]
1072pub enum GpsFixType {
1073    #[doc = "No GPS connected"]
1074    GPS_FIX_TYPE_NO_GPS = 0,
1075    #[doc = "No position information, GPS is connected"]
1076    GPS_FIX_TYPE_NO_FIX = 1,
1077    #[doc = "2D position"]
1078    GPS_FIX_TYPE_2D_FIX = 2,
1079    #[doc = "3D position"]
1080    GPS_FIX_TYPE_3D_FIX = 3,
1081    #[doc = "DGPS/SBAS aided 3D position"]
1082    GPS_FIX_TYPE_DGPS = 4,
1083    #[doc = "RTK float, 3D position"]
1084    GPS_FIX_TYPE_RTK_FLOAT = 5,
1085    #[doc = "RTK Fixed, 3D position"]
1086    GPS_FIX_TYPE_RTK_FIXED = 6,
1087    #[doc = "Static fixed, typically used for base stations"]
1088    GPS_FIX_TYPE_STATIC = 7,
1089    #[doc = "PPP, 3D position."]
1090    GPS_FIX_TYPE_PPP = 8,
1091}
1092impl GpsFixType {
1093    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1094}
1095impl Default for GpsFixType {
1096    fn default() -> Self {
1097        Self::DEFAULT
1098    }
1099}
1100bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1101impl GpsInputIgnoreFlags {
1102    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1103}
1104impl Default for GpsInputIgnoreFlags {
1105    fn default() -> Self {
1106        Self::DEFAULT
1107    }
1108}
1109#[cfg_attr(feature = "ts", derive(TS))]
1110#[cfg_attr(feature = "ts", ts(export))]
1111#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1113#[cfg_attr(feature = "serde", serde(tag = "type"))]
1114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1115#[repr(u32)]
1116#[doc = "Gripper actions."]
1117pub enum GripperActions {
1118    #[doc = "Gripper release cargo."]
1119    GRIPPER_ACTION_RELEASE = 0,
1120    #[doc = "Gripper grab onto cargo."]
1121    GRIPPER_ACTION_GRAB = 1,
1122}
1123impl GripperActions {
1124    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1125}
1126impl Default for GripperActions {
1127    fn default() -> Self {
1128        Self::DEFAULT
1129    }
1130}
1131bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1132impl HighresImuUpdatedFlags {
1133    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1134}
1135impl Default for HighresImuUpdatedFlags {
1136    fn default() -> Self {
1137        Self::DEFAULT
1138    }
1139}
1140bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1141impl HilActuatorControlsFlags {
1142    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1143}
1144impl Default for HilActuatorControlsFlags {
1145    fn default() -> Self {
1146        Self::DEFAULT
1147    }
1148}
1149bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1150impl HilSensorUpdatedFlags {
1151    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1152}
1153impl Default for HilSensorUpdatedFlags {
1154    fn default() -> Self {
1155        Self::DEFAULT
1156    }
1157}
1158bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1159impl HlFailureFlag {
1160    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1161}
1162impl Default for HlFailureFlag {
1163    fn default() -> Self {
1164        Self::DEFAULT
1165    }
1166}
1167bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1168impl IlluminatorErrorFlags {
1169    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1170}
1171impl Default for IlluminatorErrorFlags {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183#[doc = "Modes of illuminator"]
1184pub enum IlluminatorMode {
1185    #[doc = "Illuminator mode is not specified/unknown"]
1186    ILLUMINATOR_MODE_UNKNOWN = 0,
1187    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1188    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1189    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1190    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1191}
1192impl IlluminatorMode {
1193    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1194}
1195impl Default for IlluminatorMode {
1196    fn default() -> Self {
1197        Self::DEFAULT
1198    }
1199}
1200#[cfg_attr(feature = "ts", derive(TS))]
1201#[cfg_attr(feature = "ts", ts(export))]
1202#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1204#[cfg_attr(feature = "serde", serde(tag = "type"))]
1205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1206#[repr(u32)]
1207#[doc = "Type of landing target"]
1208pub enum LandingTargetType {
1209    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1210    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1211    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1212    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1213    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1214    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1215    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1216    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1217}
1218impl LandingTargetType {
1219    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1220}
1221impl Default for LandingTargetType {
1222    fn default() -> Self {
1223        Self::DEFAULT
1224    }
1225}
1226#[cfg_attr(feature = "ts", derive(TS))]
1227#[cfg_attr(feature = "ts", ts(export))]
1228#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1230#[cfg_attr(feature = "serde", serde(tag = "type"))]
1231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1232#[repr(u32)]
1233pub enum MagCalStatus {
1234    MAG_CAL_NOT_STARTED = 0,
1235    MAG_CAL_WAITING_TO_START = 1,
1236    MAG_CAL_RUNNING_STEP_ONE = 2,
1237    MAG_CAL_RUNNING_STEP_TWO = 3,
1238    MAG_CAL_SUCCESS = 4,
1239    MAG_CAL_FAILED = 5,
1240    MAG_CAL_BAD_ORIENTATION = 6,
1241    MAG_CAL_BAD_RADIUS = 7,
1242}
1243impl MagCalStatus {
1244    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1245}
1246impl Default for MagCalStatus {
1247    fn default() -> Self {
1248        Self::DEFAULT
1249    }
1250}
1251#[cfg_attr(feature = "ts", derive(TS))]
1252#[cfg_attr(feature = "ts", ts(export))]
1253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1255#[cfg_attr(feature = "serde", serde(tag = "type"))]
1256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1257#[repr(u32)]
1258pub enum MavArmAuthDeniedReason {
1259    #[doc = "Not a specific reason"]
1260    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1261    #[doc = "Authorizer will send the error as string to GCS"]
1262    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1263    #[doc = "At least one waypoint have a invalid value"]
1264    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1265    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1266    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1267    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1268    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1269    #[doc = "Weather is not good to fly"]
1270    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1271}
1272impl MavArmAuthDeniedReason {
1273    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1274}
1275impl Default for MavArmAuthDeniedReason {
1276    fn default() -> Self {
1277        Self::DEFAULT
1278    }
1279}
1280#[cfg_attr(feature = "ts", derive(TS))]
1281#[cfg_attr(feature = "ts", ts(export))]
1282#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1284#[cfg_attr(feature = "serde", serde(tag = "type"))]
1285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1286#[repr(u32)]
1287#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1288pub enum MavAutopilot {
1289    #[doc = "Generic autopilot, full support for everything"]
1290    MAV_AUTOPILOT_GENERIC = 0,
1291    #[doc = "Reserved for future use."]
1292    MAV_AUTOPILOT_RESERVED = 1,
1293    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1294    MAV_AUTOPILOT_SLUGS = 2,
1295    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1296    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1297    #[doc = "OpenPilot, <http://openpilot.org>"]
1298    MAV_AUTOPILOT_OPENPILOT = 4,
1299    #[doc = "Generic autopilot only supporting simple waypoints"]
1300    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1301    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1302    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1303    #[doc = "Generic autopilot supporting the full mission command set"]
1304    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1305    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1306    MAV_AUTOPILOT_INVALID = 8,
1307    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1308    MAV_AUTOPILOT_PPZ = 9,
1309    #[doc = "UAV Dev Board"]
1310    MAV_AUTOPILOT_UDB = 10,
1311    #[doc = "FlexiPilot"]
1312    MAV_AUTOPILOT_FP = 11,
1313    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1314    MAV_AUTOPILOT_PX4 = 12,
1315    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1316    MAV_AUTOPILOT_SMACCMPILOT = 13,
1317    #[doc = "AutoQuad -- <http://autoquad.org>"]
1318    MAV_AUTOPILOT_AUTOQUAD = 14,
1319    #[doc = "Armazila -- <http://armazila.com>"]
1320    MAV_AUTOPILOT_ARMAZILA = 15,
1321    #[doc = "Aerob -- <http://aerob.ru>"]
1322    MAV_AUTOPILOT_AEROB = 16,
1323    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1324    MAV_AUTOPILOT_ASLUAV = 17,
1325    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1326    MAV_AUTOPILOT_SMARTAP = 18,
1327    #[doc = "AirRails - <http://uaventure.com>"]
1328    MAV_AUTOPILOT_AIRRAILS = 19,
1329    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1330    MAV_AUTOPILOT_REFLEX = 20,
1331}
1332impl MavAutopilot {
1333    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1334}
1335impl Default for MavAutopilot {
1336    fn default() -> Self {
1337        Self::DEFAULT
1338    }
1339}
1340#[cfg_attr(feature = "ts", derive(TS))]
1341#[cfg_attr(feature = "ts", ts(export))]
1342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1344#[cfg_attr(feature = "serde", serde(tag = "type"))]
1345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1346#[repr(u32)]
1347pub enum MavAvssCommandFailureReason {
1348    #[doc = "AVSS defined command failure reason. PRS not steady."]
1349    PRS_NOT_STEADY = 1,
1350    #[doc = "AVSS defined command failure reason. PRS DTM not armed."]
1351    PRS_DTM_NOT_ARMED = 2,
1352    #[doc = "AVSS defined command failure reason. PRS OTM not armed."]
1353    PRS_OTM_NOT_ARMED = 3,
1354}
1355impl MavAvssCommandFailureReason {
1356    pub const DEFAULT: Self = Self::PRS_NOT_STEADY;
1357}
1358impl Default for MavAvssCommandFailureReason {
1359    fn default() -> Self {
1360        Self::DEFAULT
1361    }
1362}
1363#[cfg_attr(feature = "ts", derive(TS))]
1364#[cfg_attr(feature = "ts", ts(export))]
1365#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1367#[cfg_attr(feature = "serde", serde(tag = "type"))]
1368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1369#[repr(u32)]
1370#[doc = "Enumeration for battery charge states."]
1371pub enum MavBatteryChargeState {
1372    #[doc = "Low battery state is not provided"]
1373    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1374    #[doc = "Battery is not in low state. Normal operation."]
1375    MAV_BATTERY_CHARGE_STATE_OK = 1,
1376    #[doc = "Battery state is low, warn and monitor close."]
1377    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1378    #[doc = "Battery state is critical, return or abort immediately."]
1379    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1380    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1381    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1382    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1383    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1384    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1385    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1386    #[doc = "Battery is charging."]
1387    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1388}
1389impl MavBatteryChargeState {
1390    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1391}
1392impl Default for MavBatteryChargeState {
1393    fn default() -> Self {
1394        Self::DEFAULT
1395    }
1396}
1397bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1398impl MavBatteryFault {
1399    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1400}
1401impl Default for MavBatteryFault {
1402    fn default() -> Self {
1403        Self::DEFAULT
1404    }
1405}
1406#[cfg_attr(feature = "ts", derive(TS))]
1407#[cfg_attr(feature = "ts", ts(export))]
1408#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1410#[cfg_attr(feature = "serde", serde(tag = "type"))]
1411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1412#[repr(u32)]
1413#[doc = "Enumeration of battery functions"]
1414pub enum MavBatteryFunction {
1415    #[doc = "Battery function is unknown"]
1416    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1417    #[doc = "Battery supports all flight systems"]
1418    MAV_BATTERY_FUNCTION_ALL = 1,
1419    #[doc = "Battery for the propulsion system"]
1420    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1421    #[doc = "Avionics battery"]
1422    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1423    #[doc = "Payload battery"]
1424    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1425}
1426impl MavBatteryFunction {
1427    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1428}
1429impl Default for MavBatteryFunction {
1430    fn default() -> Self {
1431        Self::DEFAULT
1432    }
1433}
1434#[cfg_attr(feature = "ts", derive(TS))]
1435#[cfg_attr(feature = "ts", ts(export))]
1436#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1438#[cfg_attr(feature = "serde", serde(tag = "type"))]
1439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1440#[repr(u32)]
1441#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1442pub enum MavBatteryMode {
1443    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1444    MAV_BATTERY_MODE_UNKNOWN = 0,
1445    #[doc = "Battery is auto discharging (towards storage level)."]
1446    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1447    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1448    MAV_BATTERY_MODE_HOT_SWAP = 2,
1449}
1450impl MavBatteryMode {
1451    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1452}
1453impl Default for MavBatteryMode {
1454    fn default() -> Self {
1455        Self::DEFAULT
1456    }
1457}
1458#[cfg_attr(feature = "ts", derive(TS))]
1459#[cfg_attr(feature = "ts", ts(export))]
1460#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1462#[cfg_attr(feature = "serde", serde(tag = "type"))]
1463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1464#[repr(u32)]
1465#[doc = "Enumeration of battery types"]
1466pub enum MavBatteryType {
1467    #[doc = "Not specified."]
1468    MAV_BATTERY_TYPE_UNKNOWN = 0,
1469    #[doc = "Lithium polymer battery"]
1470    MAV_BATTERY_TYPE_LIPO = 1,
1471    #[doc = "Lithium-iron-phosphate battery"]
1472    MAV_BATTERY_TYPE_LIFE = 2,
1473    #[doc = "Lithium-ION battery"]
1474    MAV_BATTERY_TYPE_LION = 3,
1475    #[doc = "Nickel metal hydride battery"]
1476    MAV_BATTERY_TYPE_NIMH = 4,
1477}
1478impl MavBatteryType {
1479    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1480}
1481impl Default for MavBatteryType {
1482    fn default() -> Self {
1483        Self::DEFAULT
1484    }
1485}
1486#[cfg_attr(feature = "ts", derive(TS))]
1487#[cfg_attr(feature = "ts", ts(export))]
1488#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1490#[cfg_attr(feature = "serde", serde(tag = "type"))]
1491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1492#[repr(u32)]
1493#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1494pub enum MavCmd {
1495    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1496    MAV_CMD_NAV_WAYPOINT = 16,
1497    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1498    MAV_CMD_NAV_LOITER_UNLIM = 17,
1499    #[doc = "Loiter around this waypoint for X turns"]
1500    MAV_CMD_NAV_LOITER_TURNS = 18,
1501    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1502    MAV_CMD_NAV_LOITER_TIME = 19,
1503    #[doc = "Return to launch location"]
1504    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1505    #[doc = "Land at location."]
1506    MAV_CMD_NAV_LAND = 21,
1507    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1508    MAV_CMD_NAV_TAKEOFF = 22,
1509    #[doc = "Land at local position (local frame only)"]
1510    MAV_CMD_NAV_LAND_LOCAL = 23,
1511    #[doc = "Takeoff from local position (local frame only)"]
1512    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1513    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1514    MAV_CMD_NAV_FOLLOW = 25,
1515    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1516    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1517    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1518    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1519    #[doc = "Begin following a target"]
1520    MAV_CMD_DO_FOLLOW = 32,
1521    #[doc = "Reposition the MAV after a follow target command has been sent"]
1522    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1523    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1524    MAV_CMD_DO_ORBIT = 34,
1525    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1526    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1527    MAV_CMD_NAV_ROI = 80,
1528    #[doc = "Control autonomous path planning on the MAV."]
1529    MAV_CMD_NAV_PATHPLANNING = 81,
1530    #[doc = "Navigate to waypoint using a spline path."]
1531    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1532    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1533    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1534    #[doc = "Land using VTOL mode"]
1535    MAV_CMD_NAV_VTOL_LAND = 85,
1536    #[doc = "hand control over to an external controller"]
1537    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1538    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1539    MAV_CMD_NAV_DELAY = 93,
1540    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1541    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1542    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1543    MAV_CMD_NAV_LAST = 95,
1544    #[doc = "Delay mission state machine."]
1545    MAV_CMD_CONDITION_DELAY = 112,
1546    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1547    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1548    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1549    MAV_CMD_CONDITION_DISTANCE = 114,
1550    #[doc = "Reach a certain target angle."]
1551    MAV_CMD_CONDITION_YAW = 115,
1552    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1553    MAV_CMD_CONDITION_LAST = 159,
1554    #[doc = "Set system mode."]
1555    MAV_CMD_DO_SET_MODE = 176,
1556    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1557    MAV_CMD_DO_JUMP = 177,
1558    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1559    MAV_CMD_DO_CHANGE_SPEED = 178,
1560    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1561    MAV_CMD_DO_SET_HOME = 179,
1562    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1563    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1564    MAV_CMD_DO_SET_PARAMETER = 180,
1565    #[doc = "Set a relay to a condition."]
1566    MAV_CMD_DO_SET_RELAY = 181,
1567    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1568    MAV_CMD_DO_REPEAT_RELAY = 182,
1569    #[doc = "Set a servo to a desired PWM value."]
1570    MAV_CMD_DO_SET_SERVO = 183,
1571    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1572    MAV_CMD_DO_REPEAT_SERVO = 184,
1573    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1574    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1575    #[doc = "Change altitude set point."]
1576    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1577    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1578    MAV_CMD_DO_SET_ACTUATOR = 187,
1579    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1580    MAV_CMD_DO_RETURN_PATH_START = 188,
1581    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1582    MAV_CMD_DO_LAND_START = 189,
1583    #[doc = "Mission command to perform a landing from a rally point."]
1584    MAV_CMD_DO_RALLY_LAND = 190,
1585    #[doc = "Mission command to safely abort an autonomous landing."]
1586    MAV_CMD_DO_GO_AROUND = 191,
1587    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1588    MAV_CMD_DO_REPOSITION = 192,
1589    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1590    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1591    #[doc = "Set moving direction to forward or reverse."]
1592    MAV_CMD_DO_SET_REVERSE = 194,
1593    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1594    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1595    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1596    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1597    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1598    MAV_CMD_DO_SET_ROI_NONE = 197,
1599    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1600    MAV_CMD_DO_SET_ROI_SYSID = 198,
1601    #[doc = "Control onboard camera system."]
1602    MAV_CMD_DO_CONTROL_VIDEO = 200,
1603    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1604    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1605    MAV_CMD_DO_SET_ROI = 201,
1606    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1607    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1608    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1609    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1610    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1611    #[doc = "Mission command to configure a camera or antenna mount"]
1612    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1613    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1614    #[doc = "Mission command to control a camera or antenna mount"]
1615    MAV_CMD_DO_MOUNT_CONTROL = 205,
1616    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1617    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1618    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1619    MAV_CMD_DO_FENCE_ENABLE = 207,
1620    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1621    MAV_CMD_DO_PARACHUTE = 208,
1622    #[doc = "Command to perform motor test."]
1623    MAV_CMD_DO_MOTOR_TEST = 209,
1624    #[doc = "Change to/from inverted flight."]
1625    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1626    #[doc = "Mission command to operate a gripper."]
1627    MAV_CMD_DO_GRIPPER = 211,
1628    #[doc = "Enable/disable autotune."]
1629    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1630    #[doc = "Sets a desired vehicle turn angle and speed change."]
1631    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1632    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1633    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1634    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1635    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1636    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1637    #[doc = "set id of master controller"]
1638    MAV_CMD_DO_GUIDED_MASTER = 221,
1639    #[doc = "Set limits for external control"]
1640    MAV_CMD_DO_GUIDED_LIMITS = 222,
1641    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1642    MAV_CMD_DO_ENGINE_CONTROL = 223,
1643    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1644    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1645    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1646    MAV_CMD_DO_LAST = 240,
1647    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1648    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1649    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1650    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1651    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1652    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1653    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1654    MAV_CMD_PREFLIGHT_STORAGE = 245,
1655    #[doc = "Request the reboot or shutdown of system components."]
1656    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1657    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1658    MAV_CMD_OVERRIDE_GOTO = 252,
1659    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1660    MAV_CMD_OBLIQUE_SURVEY = 260,
1661    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1662    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1663    #[doc = "start running a mission"]
1664    MAV_CMD_MISSION_START = 300,
1665    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1666    MAV_CMD_ACTUATOR_TEST = 310,
1667    #[doc = "Actuator configuration command."]
1668    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1669    #[doc = "Arms / Disarms a component"]
1670    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1671    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1672    MAV_CMD_RUN_PREARM_CHECKS = 401,
1673    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1674    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1675    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1676    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1677    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1678    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1679    MAV_CMD_GET_HOME_POSITION = 410,
1680    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1681    MAV_CMD_INJECT_FAILURE = 420,
1682    #[doc = "Starts receiver pairing."]
1683    MAV_CMD_START_RX_PAIR = 500,
1684    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1685    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1686    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1687    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1688    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1689    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1690    MAV_CMD_REQUEST_MESSAGE = 512,
1691    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1692    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1693    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1694    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1695    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1696    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1697    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1698    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1699    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1700    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1701    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1702    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1703    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1704    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1705    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1706    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1707    MAV_CMD_STORAGE_FORMAT = 526,
1708    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1709    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1710    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1711    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1712    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1713    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1714    #[doc = "Reset all camera settings to Factory Default"]
1715    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1716    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1717    MAV_CMD_SET_CAMERA_MODE = 530,
1718    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1719    MAV_CMD_SET_CAMERA_ZOOM = 531,
1720    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1721    MAV_CMD_SET_CAMERA_FOCUS = 532,
1722    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1723    MAV_CMD_SET_STORAGE_USAGE = 533,
1724    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1725    MAV_CMD_SET_CAMERA_SOURCE = 534,
1726    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1727    MAV_CMD_JUMP_TAG = 600,
1728    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1729    MAV_CMD_DO_JUMP_TAG = 601,
1730    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1731    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1732    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1733    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1734    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1735    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1736    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1737    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1738    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1739    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1740    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1741    #[doc = "Enable or disable on-board camera triggering system."]
1742    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1743    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1744    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1745    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1746    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1747    #[doc = "Stops ongoing tracking."]
1748    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1749    #[doc = "Starts video capture (recording)."]
1750    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1751    #[doc = "Stop the current video capture (recording)."]
1752    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1753    #[doc = "Start video streaming"]
1754    MAV_CMD_VIDEO_START_STREAMING = 2502,
1755    #[doc = "Stop the given video stream"]
1756    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1757    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1758    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1759    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1760    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1761    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1762    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1763    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1764    MAV_CMD_LOGGING_START = 2510,
1765    #[doc = "Request to stop streaming log data over MAVLink"]
1766    MAV_CMD_LOGGING_STOP = 2511,
1767    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1768    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1769    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1770    #[doc = "Create a panorama at the current position"]
1771    MAV_CMD_PANORAMA_CREATE = 2800,
1772    #[doc = "Request VTOL transition"]
1773    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1774    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1775    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1776    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1777    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1778    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1779    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1780    #[doc = "Delay mission state machine until gate has been reached."]
1781    MAV_CMD_CONDITION_GATE = 4501,
1782    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1783    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1784    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1785    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1786    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1787    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1788    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1789    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1790    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1791    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1792    #[doc = "Rally point. You can have multiple rally points defined."]
1793    MAV_CMD_NAV_RALLY_POINT = 5100,
1794    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1795    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1796    #[doc = "Change state of safety switch."]
1797    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1798    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1799    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1800    #[deprecated = "  (Deprecated since 2021-06)"]
1801    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1802    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1803    #[deprecated = "  (Deprecated since 2021-06)"]
1804    #[doc = "Control the payload deployment."]
1805    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1806    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1807    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1808    #[doc = "Command to operate winch."]
1809    MAV_CMD_DO_WINCH = 42600,
1810    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1811    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1812    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1813    MAV_CMD_WAYPOINT_USER_1 = 31000,
1814    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1815    MAV_CMD_WAYPOINT_USER_2 = 31001,
1816    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1817    MAV_CMD_WAYPOINT_USER_3 = 31002,
1818    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1819    MAV_CMD_WAYPOINT_USER_4 = 31003,
1820    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1821    MAV_CMD_WAYPOINT_USER_5 = 31004,
1822    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1823    MAV_CMD_SPATIAL_USER_1 = 31005,
1824    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1825    MAV_CMD_SPATIAL_USER_2 = 31006,
1826    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1827    MAV_CMD_SPATIAL_USER_3 = 31007,
1828    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1829    MAV_CMD_SPATIAL_USER_4 = 31008,
1830    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1831    MAV_CMD_SPATIAL_USER_5 = 31009,
1832    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1833    MAV_CMD_USER_1 = 31010,
1834    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1835    MAV_CMD_USER_2 = 31011,
1836    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1837    MAV_CMD_USER_3 = 31012,
1838    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1839    MAV_CMD_USER_4 = 31013,
1840    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1841    MAV_CMD_USER_5 = 31014,
1842    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1843    MAV_CMD_CAN_FORWARD = 32000,
1844    #[doc = "AVSS defined command. Set PRS arm statuses."]
1845    MAV_CMD_PRS_SET_ARM = 60050,
1846    #[doc = "AVSS defined command. Gets PRS arm statuses"]
1847    MAV_CMD_PRS_GET_ARM = 60051,
1848    #[doc = "AVSS defined command.  Get the PRS battery voltage in millivolts"]
1849    MAV_CMD_PRS_GET_BATTERY = 60052,
1850    #[doc = "AVSS defined command. Get the PRS error statuses."]
1851    MAV_CMD_PRS_GET_ERR = 60053,
1852    #[doc = "AVSS defined command. Set the ATS arming altitude in meters."]
1853    MAV_CMD_PRS_SET_ARM_ALTI = 60070,
1854    #[doc = "AVSS defined command. Get the ATS arming altitude in meters."]
1855    MAV_CMD_PRS_GET_ARM_ALTI = 60071,
1856    #[doc = "AVSS defined command. Shuts down the PRS system."]
1857    MAV_CMD_PRS_SHUTDOWN = 60072,
1858}
1859impl MavCmd {
1860    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1861}
1862impl Default for MavCmd {
1863    fn default() -> Self {
1864        Self::DEFAULT
1865    }
1866}
1867#[cfg_attr(feature = "ts", derive(TS))]
1868#[cfg_attr(feature = "ts", ts(export))]
1869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1871#[cfg_attr(feature = "serde", serde(tag = "type"))]
1872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1873#[repr(u32)]
1874#[doc = "Possible actions an aircraft can take to avoid a collision."]
1875pub enum MavCollisionAction {
1876    #[doc = "Ignore any potential collisions"]
1877    MAV_COLLISION_ACTION_NONE = 0,
1878    #[doc = "Report potential collision"]
1879    MAV_COLLISION_ACTION_REPORT = 1,
1880    #[doc = "Ascend or Descend to avoid threat"]
1881    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1882    #[doc = "Move horizontally to avoid threat"]
1883    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1884    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1885    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1886    #[doc = "Aircraft to fly directly back to its launch point"]
1887    MAV_COLLISION_ACTION_RTL = 5,
1888    #[doc = "Aircraft to stop in place"]
1889    MAV_COLLISION_ACTION_HOVER = 6,
1890}
1891impl MavCollisionAction {
1892    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1893}
1894impl Default for MavCollisionAction {
1895    fn default() -> Self {
1896        Self::DEFAULT
1897    }
1898}
1899#[cfg_attr(feature = "ts", derive(TS))]
1900#[cfg_attr(feature = "ts", ts(export))]
1901#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1903#[cfg_attr(feature = "serde", serde(tag = "type"))]
1904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1905#[repr(u32)]
1906#[doc = "Source of information about this collision."]
1907pub enum MavCollisionSrc {
1908    #[doc = "ID field references ADSB_VEHICLE packets"]
1909    MAV_COLLISION_SRC_ADSB = 0,
1910    #[doc = "ID field references MAVLink SRC ID"]
1911    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1912}
1913impl MavCollisionSrc {
1914    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1915}
1916impl Default for MavCollisionSrc {
1917    fn default() -> Self {
1918        Self::DEFAULT
1919    }
1920}
1921#[cfg_attr(feature = "ts", derive(TS))]
1922#[cfg_attr(feature = "ts", ts(export))]
1923#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1925#[cfg_attr(feature = "serde", serde(tag = "type"))]
1926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1927#[repr(u32)]
1928#[doc = "Aircraft-rated danger from this threat."]
1929pub enum MavCollisionThreatLevel {
1930    #[doc = "Not a threat"]
1931    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1932    #[doc = "Craft is mildly concerned about this threat"]
1933    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1934    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1935    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1936}
1937impl MavCollisionThreatLevel {
1938    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1939}
1940impl Default for MavCollisionThreatLevel {
1941    fn default() -> Self {
1942        Self::DEFAULT
1943    }
1944}
1945#[cfg_attr(feature = "ts", derive(TS))]
1946#[cfg_attr(feature = "ts", ts(export))]
1947#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1949#[cfg_attr(feature = "serde", serde(tag = "type"))]
1950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1951#[repr(u32)]
1952#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1953pub enum MavComponent {
1954    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1955    MAV_COMP_ID_ALL = 0,
1956    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1957    MAV_COMP_ID_AUTOPILOT1 = 1,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER1 = 25,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER2 = 26,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER3 = 27,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER4 = 28,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER5 = 29,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER6 = 30,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER7 = 31,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER8 = 32,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER9 = 33,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER10 = 34,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER11 = 35,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER12 = 36,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER13 = 37,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER14 = 38,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER15 = 39,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER16 = 40,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER17 = 41,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER18 = 42,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER19 = 43,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER20 = 44,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER21 = 45,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER22 = 46,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER23 = 47,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER24 = 48,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER25 = 49,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER26 = 50,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER27 = 51,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER28 = 52,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER29 = 53,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER30 = 54,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER31 = 55,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER32 = 56,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER33 = 57,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER34 = 58,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER35 = 59,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER36 = 60,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER37 = 61,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER38 = 62,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER39 = 63,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER40 = 64,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER41 = 65,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER42 = 66,
2042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2043    MAV_COMP_ID_USER43 = 67,
2044    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2045    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER45 = 69,
2048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2049    MAV_COMP_ID_USER46 = 70,
2050    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2051    MAV_COMP_ID_USER47 = 71,
2052    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2053    MAV_COMP_ID_USER48 = 72,
2054    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2055    MAV_COMP_ID_USER49 = 73,
2056    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2057    MAV_COMP_ID_USER50 = 74,
2058    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2059    MAV_COMP_ID_USER51 = 75,
2060    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2061    MAV_COMP_ID_USER52 = 76,
2062    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2063    MAV_COMP_ID_USER53 = 77,
2064    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2065    MAV_COMP_ID_USER54 = 78,
2066    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2067    MAV_COMP_ID_USER55 = 79,
2068    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2069    MAV_COMP_ID_USER56 = 80,
2070    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2071    MAV_COMP_ID_USER57 = 81,
2072    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2073    MAV_COMP_ID_USER58 = 82,
2074    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2075    MAV_COMP_ID_USER59 = 83,
2076    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2077    MAV_COMP_ID_USER60 = 84,
2078    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2079    MAV_COMP_ID_USER61 = 85,
2080    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2081    MAV_COMP_ID_USER62 = 86,
2082    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2083    MAV_COMP_ID_USER63 = 87,
2084    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2085    MAV_COMP_ID_USER64 = 88,
2086    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2087    MAV_COMP_ID_USER65 = 89,
2088    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2089    MAV_COMP_ID_USER66 = 90,
2090    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2091    MAV_COMP_ID_USER67 = 91,
2092    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2093    MAV_COMP_ID_USER68 = 92,
2094    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2095    MAV_COMP_ID_USER69 = 93,
2096    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2097    MAV_COMP_ID_USER70 = 94,
2098    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2099    MAV_COMP_ID_USER71 = 95,
2100    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2101    MAV_COMP_ID_USER72 = 96,
2102    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2103    MAV_COMP_ID_USER73 = 97,
2104    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2105    MAV_COMP_ID_USER74 = 98,
2106    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2107    MAV_COMP_ID_USER75 = 99,
2108    #[doc = "Camera #1."]
2109    MAV_COMP_ID_CAMERA = 100,
2110    #[doc = "Camera #2."]
2111    MAV_COMP_ID_CAMERA2 = 101,
2112    #[doc = "Camera #3."]
2113    MAV_COMP_ID_CAMERA3 = 102,
2114    #[doc = "Camera #4."]
2115    MAV_COMP_ID_CAMERA4 = 103,
2116    #[doc = "Camera #5."]
2117    MAV_COMP_ID_CAMERA5 = 104,
2118    #[doc = "Camera #6."]
2119    MAV_COMP_ID_CAMERA6 = 105,
2120    #[doc = "Servo #1."]
2121    MAV_COMP_ID_SERVO1 = 140,
2122    #[doc = "Servo #2."]
2123    MAV_COMP_ID_SERVO2 = 141,
2124    #[doc = "Servo #3."]
2125    MAV_COMP_ID_SERVO3 = 142,
2126    #[doc = "Servo #4."]
2127    MAV_COMP_ID_SERVO4 = 143,
2128    #[doc = "Servo #5."]
2129    MAV_COMP_ID_SERVO5 = 144,
2130    #[doc = "Servo #6."]
2131    MAV_COMP_ID_SERVO6 = 145,
2132    #[doc = "Servo #7."]
2133    MAV_COMP_ID_SERVO7 = 146,
2134    #[doc = "Servo #8."]
2135    MAV_COMP_ID_SERVO8 = 147,
2136    #[doc = "Servo #9."]
2137    MAV_COMP_ID_SERVO9 = 148,
2138    #[doc = "Servo #10."]
2139    MAV_COMP_ID_SERVO10 = 149,
2140    #[doc = "Servo #11."]
2141    MAV_COMP_ID_SERVO11 = 150,
2142    #[doc = "Servo #12."]
2143    MAV_COMP_ID_SERVO12 = 151,
2144    #[doc = "Servo #13."]
2145    MAV_COMP_ID_SERVO13 = 152,
2146    #[doc = "Servo #14."]
2147    MAV_COMP_ID_SERVO14 = 153,
2148    #[doc = "Gimbal #1."]
2149    MAV_COMP_ID_GIMBAL = 154,
2150    #[doc = "Logging component."]
2151    MAV_COMP_ID_LOG = 155,
2152    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2153    MAV_COMP_ID_ADSB = 156,
2154    #[doc = "On Screen Display (OSD) devices for video links."]
2155    MAV_COMP_ID_OSD = 157,
2156    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2157    MAV_COMP_ID_PERIPHERAL = 158,
2158    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2159    #[doc = "Gimbal ID for QX1."]
2160    MAV_COMP_ID_QX1_GIMBAL = 159,
2161    #[doc = "FLARM collision alert component."]
2162    MAV_COMP_ID_FLARM = 160,
2163    #[doc = "Parachute component."]
2164    MAV_COMP_ID_PARACHUTE = 161,
2165    #[doc = "Winch component."]
2166    MAV_COMP_ID_WINCH = 169,
2167    #[doc = "Gimbal #2."]
2168    MAV_COMP_ID_GIMBAL2 = 171,
2169    #[doc = "Gimbal #3."]
2170    MAV_COMP_ID_GIMBAL3 = 172,
2171    #[doc = "Gimbal #4"]
2172    MAV_COMP_ID_GIMBAL4 = 173,
2173    #[doc = "Gimbal #5."]
2174    MAV_COMP_ID_GIMBAL5 = 174,
2175    #[doc = "Gimbal #6."]
2176    MAV_COMP_ID_GIMBAL6 = 175,
2177    #[doc = "Battery #1."]
2178    MAV_COMP_ID_BATTERY = 180,
2179    #[doc = "Battery #2."]
2180    MAV_COMP_ID_BATTERY2 = 181,
2181    #[doc = "CAN over MAVLink client."]
2182    MAV_COMP_ID_MAVCAN = 189,
2183    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2184    MAV_COMP_ID_MISSIONPLANNER = 190,
2185    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2186    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2187    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2188    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2189    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2190    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2191    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2192    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2193    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2194    MAV_COMP_ID_PATHPLANNER = 195,
2195    #[doc = "Component that plans a collision free path between two points."]
2196    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2197    #[doc = "Component that provides position estimates using VIO techniques."]
2198    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2199    #[doc = "Component that manages pairing of vehicle and GCS."]
2200    MAV_COMP_ID_PAIRING_MANAGER = 198,
2201    #[doc = "Inertial Measurement Unit (IMU) #1."]
2202    MAV_COMP_ID_IMU = 200,
2203    #[doc = "Inertial Measurement Unit (IMU) #2."]
2204    MAV_COMP_ID_IMU_2 = 201,
2205    #[doc = "Inertial Measurement Unit (IMU) #3."]
2206    MAV_COMP_ID_IMU_3 = 202,
2207    #[doc = "GPS #1."]
2208    MAV_COMP_ID_GPS = 220,
2209    #[doc = "GPS #2."]
2210    MAV_COMP_ID_GPS2 = 221,
2211    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2212    MAV_COMP_ID_ODID_TXRX_1 = 236,
2213    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2214    MAV_COMP_ID_ODID_TXRX_2 = 237,
2215    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2216    MAV_COMP_ID_ODID_TXRX_3 = 238,
2217    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2218    MAV_COMP_ID_UDP_BRIDGE = 240,
2219    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2220    MAV_COMP_ID_UART_BRIDGE = 241,
2221    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2222    MAV_COMP_ID_TUNNEL_NODE = 242,
2223    #[doc = "Illuminator"]
2224    MAV_COMP_ID_ILLUMINATOR = 243,
2225    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2226    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2227    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2228}
2229impl MavComponent {
2230    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2231}
2232impl Default for MavComponent {
2233    fn default() -> Self {
2234        Self::DEFAULT
2235    }
2236}
2237#[cfg_attr(feature = "ts", derive(TS))]
2238#[cfg_attr(feature = "ts", ts(export))]
2239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2241#[cfg_attr(feature = "serde", serde(tag = "type"))]
2242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2243#[repr(u32)]
2244#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2245#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2246pub enum MavDataStream {
2247    #[doc = "Enable all data streams"]
2248    MAV_DATA_STREAM_ALL = 0,
2249    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2250    MAV_DATA_STREAM_RAW_SENSORS = 1,
2251    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2252    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2253    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2254    MAV_DATA_STREAM_RC_CHANNELS = 3,
2255    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2256    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2257    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2258    MAV_DATA_STREAM_POSITION = 6,
2259    #[doc = "Dependent on the autopilot"]
2260    MAV_DATA_STREAM_EXTRA1 = 10,
2261    #[doc = "Dependent on the autopilot"]
2262    MAV_DATA_STREAM_EXTRA2 = 11,
2263    #[doc = "Dependent on the autopilot"]
2264    MAV_DATA_STREAM_EXTRA3 = 12,
2265}
2266impl MavDataStream {
2267    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2268}
2269impl Default for MavDataStream {
2270    fn default() -> Self {
2271        Self::DEFAULT
2272    }
2273}
2274#[cfg_attr(feature = "ts", derive(TS))]
2275#[cfg_attr(feature = "ts", ts(export))]
2276#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2278#[cfg_attr(feature = "serde", serde(tag = "type"))]
2279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2280#[repr(u32)]
2281#[doc = "Enumeration of distance sensor types"]
2282pub enum MavDistanceSensor {
2283    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2284    MAV_DISTANCE_SENSOR_LASER = 0,
2285    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2286    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2287    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2288    MAV_DISTANCE_SENSOR_INFRARED = 2,
2289    #[doc = "Radar type, e.g. uLanding units"]
2290    MAV_DISTANCE_SENSOR_RADAR = 3,
2291    #[doc = "Broken or unknown type, e.g. analog units"]
2292    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2293}
2294impl MavDistanceSensor {
2295    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2296}
2297impl Default for MavDistanceSensor {
2298    fn default() -> Self {
2299        Self::DEFAULT
2300    }
2301}
2302#[cfg_attr(feature = "ts", derive(TS))]
2303#[cfg_attr(feature = "ts", ts(export))]
2304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2306#[cfg_attr(feature = "serde", serde(tag = "type"))]
2307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2308#[repr(u32)]
2309#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2310pub enum MavDoRepositionFlags {
2311    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2312    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2313}
2314impl MavDoRepositionFlags {
2315    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2316}
2317impl Default for MavDoRepositionFlags {
2318    fn default() -> Self {
2319        Self::DEFAULT
2320    }
2321}
2322#[cfg_attr(feature = "ts", derive(TS))]
2323#[cfg_attr(feature = "ts", ts(export))]
2324#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2326#[cfg_attr(feature = "serde", serde(tag = "type"))]
2327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2328#[repr(u32)]
2329#[doc = "Enumeration of estimator types"]
2330pub enum MavEstimatorType {
2331    #[doc = "Unknown type of the estimator."]
2332    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2333    #[doc = "This is a naive estimator without any real covariance feedback."]
2334    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2335    #[doc = "Computer vision based estimate. Might be up to scale."]
2336    MAV_ESTIMATOR_TYPE_VISION = 2,
2337    #[doc = "Visual-inertial estimate."]
2338    MAV_ESTIMATOR_TYPE_VIO = 3,
2339    #[doc = "Plain GPS estimate."]
2340    MAV_ESTIMATOR_TYPE_GPS = 4,
2341    #[doc = "Estimator integrating GPS and inertial sensing."]
2342    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2343    #[doc = "Estimate from external motion capturing system."]
2344    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2345    #[doc = "Estimator based on lidar sensor input."]
2346    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2347    #[doc = "Estimator on autopilot."]
2348    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2349}
2350impl MavEstimatorType {
2351    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2352}
2353impl Default for MavEstimatorType {
2354    fn default() -> Self {
2355        Self::DEFAULT
2356    }
2357}
2358#[cfg_attr(feature = "ts", derive(TS))]
2359#[cfg_attr(feature = "ts", ts(export))]
2360#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2362#[cfg_attr(feature = "serde", serde(tag = "type"))]
2363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2364#[repr(u32)]
2365#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2366pub enum MavEventCurrentSequenceFlags {
2367    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2368    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2369}
2370impl MavEventCurrentSequenceFlags {
2371    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2372}
2373impl Default for MavEventCurrentSequenceFlags {
2374    fn default() -> Self {
2375        Self::DEFAULT
2376    }
2377}
2378#[cfg_attr(feature = "ts", derive(TS))]
2379#[cfg_attr(feature = "ts", ts(export))]
2380#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2382#[cfg_attr(feature = "serde", serde(tag = "type"))]
2383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2384#[repr(u32)]
2385#[doc = "Reason for an event error response."]
2386pub enum MavEventErrorReason {
2387    #[doc = "The requested event is not available (anymore)."]
2388    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2389}
2390impl MavEventErrorReason {
2391    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2392}
2393impl Default for MavEventErrorReason {
2394    fn default() -> Self {
2395        Self::DEFAULT
2396    }
2397}
2398#[cfg_attr(feature = "ts", derive(TS))]
2399#[cfg_attr(feature = "ts", ts(export))]
2400#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2402#[cfg_attr(feature = "serde", serde(tag = "type"))]
2403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2404#[repr(u32)]
2405#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2406pub enum MavFrame {
2407    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2408    MAV_FRAME_GLOBAL = 0,
2409    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2410    MAV_FRAME_LOCAL_NED = 1,
2411    #[doc = "NOT a coordinate frame, indicates a mission command."]
2412    MAV_FRAME_MISSION = 2,
2413    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2414    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2415    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2416    MAV_FRAME_LOCAL_ENU = 4,
2417    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2418    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2419    MAV_FRAME_GLOBAL_INT = 5,
2420    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2421    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2422    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2423    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2424    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2425    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2426    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2427    MAV_FRAME_BODY_NED = 8,
2428    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2429    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2430    MAV_FRAME_BODY_OFFSET_NED = 9,
2431    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2432    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2433    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2434    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2435    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2436    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2437    MAV_FRAME_BODY_FRD = 12,
2438    #[deprecated = "  (Deprecated since 2019-04)"]
2439    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2440    MAV_FRAME_RESERVED_13 = 13,
2441    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2442    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2443    MAV_FRAME_RESERVED_14 = 14,
2444    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2445    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2446    MAV_FRAME_RESERVED_15 = 15,
2447    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2448    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2449    MAV_FRAME_RESERVED_16 = 16,
2450    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2451    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2452    MAV_FRAME_RESERVED_17 = 17,
2453    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2454    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2455    MAV_FRAME_RESERVED_18 = 18,
2456    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2457    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2458    MAV_FRAME_RESERVED_19 = 19,
2459    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2460    MAV_FRAME_LOCAL_FRD = 20,
2461    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2462    MAV_FRAME_LOCAL_FLU = 21,
2463}
2464impl MavFrame {
2465    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2466}
2467impl Default for MavFrame {
2468    fn default() -> Self {
2469        Self::DEFAULT
2470    }
2471}
2472#[cfg_attr(feature = "ts", derive(TS))]
2473#[cfg_attr(feature = "ts", ts(export))]
2474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2476#[cfg_attr(feature = "serde", serde(tag = "type"))]
2477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2478#[repr(u32)]
2479#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2480pub enum MavFtpErr {
2481    #[doc = "None: No error"]
2482    MAV_FTP_ERR_NONE = 0,
2483    #[doc = "Fail: Unknown failure"]
2484    MAV_FTP_ERR_FAIL = 1,
2485    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2486    MAV_FTP_ERR_FAILERRNO = 2,
2487    #[doc = "InvalidDataSize: Payload size is invalid"]
2488    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2489    #[doc = "InvalidSession: Session is not currently open"]
2490    MAV_FTP_ERR_INVALIDSESSION = 4,
2491    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2492    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2493    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2494    MAV_FTP_ERR_EOF = 6,
2495    #[doc = "UnknownCommand: Unknown command / opcode"]
2496    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2497    #[doc = "FileExists: File/directory already exists"]
2498    MAV_FTP_ERR_FILEEXISTS = 8,
2499    #[doc = "FileProtected: File/directory is write protected"]
2500    MAV_FTP_ERR_FILEPROTECTED = 9,
2501    #[doc = "FileNotFound: File/directory not found"]
2502    MAV_FTP_ERR_FILENOTFOUND = 10,
2503}
2504impl MavFtpErr {
2505    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2506}
2507impl Default for MavFtpErr {
2508    fn default() -> Self {
2509        Self::DEFAULT
2510    }
2511}
2512#[cfg_attr(feature = "ts", derive(TS))]
2513#[cfg_attr(feature = "ts", ts(export))]
2514#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2516#[cfg_attr(feature = "serde", serde(tag = "type"))]
2517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2518#[repr(u32)]
2519#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2520pub enum MavFtpOpcode {
2521    #[doc = "None. Ignored, always ACKed"]
2522    MAV_FTP_OPCODE_NONE = 0,
2523    #[doc = "TerminateSession: Terminates open Read session"]
2524    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2525    #[doc = "ResetSessions: Terminates all open read sessions"]
2526    MAV_FTP_OPCODE_RESETSESSION = 2,
2527    #[doc = "ListDirectory. List files and directories in path from offset"]
2528    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2529    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2530    MAV_FTP_OPCODE_OPENFILERO = 4,
2531    #[doc = "ReadFile: Reads size bytes from offset in session"]
2532    MAV_FTP_OPCODE_READFILE = 5,
2533    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2534    MAV_FTP_OPCODE_CREATEFILE = 6,
2535    #[doc = "WriteFile: Writes size bytes to offset in session"]
2536    MAV_FTP_OPCODE_WRITEFILE = 7,
2537    #[doc = "RemoveFile: Remove file at path"]
2538    MAV_FTP_OPCODE_REMOVEFILE = 8,
2539    #[doc = "CreateDirectory: Creates directory at path"]
2540    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2541    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2542    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2543    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2544    MAV_FTP_OPCODE_OPENFILEWO = 11,
2545    #[doc = "TruncateFile: Truncate file at path to offset length"]
2546    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2547    #[doc = "Rename: Rename path1 to path2"]
2548    MAV_FTP_OPCODE_RENAME = 13,
2549    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2550    MAV_FTP_OPCODE_CALCFILECRC = 14,
2551    #[doc = "BurstReadFile: Burst download session file"]
2552    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2553    #[doc = "ACK: ACK response"]
2554    MAV_FTP_OPCODE_ACK = 128,
2555    #[doc = "NAK: NAK response"]
2556    MAV_FTP_OPCODE_NAK = 129,
2557}
2558impl MavFtpOpcode {
2559    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2560}
2561impl Default for MavFtpOpcode {
2562    fn default() -> Self {
2563        Self::DEFAULT
2564    }
2565}
2566#[cfg_attr(feature = "ts", derive(TS))]
2567#[cfg_attr(feature = "ts", ts(export))]
2568#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2570#[cfg_attr(feature = "serde", serde(tag = "type"))]
2571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2572#[repr(u32)]
2573#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2574pub enum MavFuelType {
2575    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2576    MAV_FUEL_TYPE_UNKNOWN = 0,
2577    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2578    MAV_FUEL_TYPE_LIQUID = 1,
2579    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2580    MAV_FUEL_TYPE_GAS = 2,
2581}
2582impl MavFuelType {
2583    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2584}
2585impl Default for MavFuelType {
2586    fn default() -> Self {
2587        Self::DEFAULT
2588    }
2589}
2590bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2591impl MavGeneratorStatusFlag {
2592    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2593}
2594impl Default for MavGeneratorStatusFlag {
2595    fn default() -> Self {
2596        Self::DEFAULT
2597    }
2598}
2599#[cfg_attr(feature = "ts", derive(TS))]
2600#[cfg_attr(feature = "ts", ts(export))]
2601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2603#[cfg_attr(feature = "serde", serde(tag = "type"))]
2604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2605#[repr(u32)]
2606#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2607pub enum MavGoto {
2608    #[doc = "Hold at the current position."]
2609    MAV_GOTO_DO_HOLD = 0,
2610    #[doc = "Continue with the next item in mission execution."]
2611    MAV_GOTO_DO_CONTINUE = 1,
2612    #[doc = "Hold at the current position of the system"]
2613    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2614    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2615    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2616}
2617impl MavGoto {
2618    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2619}
2620impl Default for MavGoto {
2621    fn default() -> Self {
2622        Self::DEFAULT
2623    }
2624}
2625#[cfg_attr(feature = "ts", derive(TS))]
2626#[cfg_attr(feature = "ts", ts(export))]
2627#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2629#[cfg_attr(feature = "serde", serde(tag = "type"))]
2630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2631#[repr(u32)]
2632#[doc = "Enumeration of landed detector states"]
2633pub enum MavLandedState {
2634    #[doc = "MAV landed state is unknown"]
2635    MAV_LANDED_STATE_UNDEFINED = 0,
2636    #[doc = "MAV is landed (on ground)"]
2637    MAV_LANDED_STATE_ON_GROUND = 1,
2638    #[doc = "MAV is in air"]
2639    MAV_LANDED_STATE_IN_AIR = 2,
2640    #[doc = "MAV currently taking off"]
2641    MAV_LANDED_STATE_TAKEOFF = 3,
2642    #[doc = "MAV currently landing"]
2643    MAV_LANDED_STATE_LANDING = 4,
2644}
2645impl MavLandedState {
2646    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2647}
2648impl Default for MavLandedState {
2649    fn default() -> Self {
2650        Self::DEFAULT
2651    }
2652}
2653#[cfg_attr(feature = "ts", derive(TS))]
2654#[cfg_attr(feature = "ts", ts(export))]
2655#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2657#[cfg_attr(feature = "serde", serde(tag = "type"))]
2658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2659#[repr(u32)]
2660#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2661pub enum MavMissionResult {
2662    #[doc = "mission accepted OK"]
2663    MAV_MISSION_ACCEPTED = 0,
2664    #[doc = "Generic error / not accepting mission commands at all right now."]
2665    MAV_MISSION_ERROR = 1,
2666    #[doc = "Coordinate frame is not supported."]
2667    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2668    #[doc = "Command is not supported."]
2669    MAV_MISSION_UNSUPPORTED = 3,
2670    #[doc = "Mission items exceed storage space."]
2671    MAV_MISSION_NO_SPACE = 4,
2672    #[doc = "One of the parameters has an invalid value."]
2673    MAV_MISSION_INVALID = 5,
2674    #[doc = "param1 has an invalid value."]
2675    MAV_MISSION_INVALID_PARAM1 = 6,
2676    #[doc = "param2 has an invalid value."]
2677    MAV_MISSION_INVALID_PARAM2 = 7,
2678    #[doc = "param3 has an invalid value."]
2679    MAV_MISSION_INVALID_PARAM3 = 8,
2680    #[doc = "param4 has an invalid value."]
2681    MAV_MISSION_INVALID_PARAM4 = 9,
2682    #[doc = "x / param5 has an invalid value."]
2683    MAV_MISSION_INVALID_PARAM5_X = 10,
2684    #[doc = "y / param6 has an invalid value."]
2685    MAV_MISSION_INVALID_PARAM6_Y = 11,
2686    #[doc = "z / param7 has an invalid value."]
2687    MAV_MISSION_INVALID_PARAM7 = 12,
2688    #[doc = "Mission item received out of sequence"]
2689    MAV_MISSION_INVALID_SEQUENCE = 13,
2690    #[doc = "Not accepting any mission commands from this communication partner."]
2691    MAV_MISSION_DENIED = 14,
2692    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2693    MAV_MISSION_OPERATION_CANCELLED = 15,
2694}
2695impl MavMissionResult {
2696    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2697}
2698impl Default for MavMissionResult {
2699    fn default() -> Self {
2700        Self::DEFAULT
2701    }
2702}
2703#[cfg_attr(feature = "ts", derive(TS))]
2704#[cfg_attr(feature = "ts", ts(export))]
2705#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2707#[cfg_attr(feature = "serde", serde(tag = "type"))]
2708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2709#[repr(u32)]
2710#[doc = "Type of mission items being requested/sent in mission protocol."]
2711pub enum MavMissionType {
2712    #[doc = "Items are mission commands for main mission."]
2713    MAV_MISSION_TYPE_MISSION = 0,
2714    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2715    MAV_MISSION_TYPE_FENCE = 1,
2716    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2717    MAV_MISSION_TYPE_RALLY = 2,
2718    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2719    MAV_MISSION_TYPE_ALL = 255,
2720}
2721impl MavMissionType {
2722    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2723}
2724impl Default for MavMissionType {
2725    fn default() -> Self {
2726        Self::DEFAULT
2727    }
2728}
2729#[cfg_attr(feature = "ts", derive(TS))]
2730#[cfg_attr(feature = "ts", ts(export))]
2731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2733#[cfg_attr(feature = "serde", serde(tag = "type"))]
2734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2735#[repr(u32)]
2736#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2737pub enum MavMode {
2738    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2739    MAV_MODE_PREFLIGHT = 0,
2740    #[doc = "System is allowed to be active, under assisted RC control."]
2741    MAV_MODE_STABILIZE_DISARMED = 80,
2742    #[doc = "System is allowed to be active, under assisted RC control."]
2743    MAV_MODE_STABILIZE_ARMED = 208,
2744    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2745    MAV_MODE_MANUAL_DISARMED = 64,
2746    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2747    MAV_MODE_MANUAL_ARMED = 192,
2748    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2749    MAV_MODE_GUIDED_DISARMED = 88,
2750    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2751    MAV_MODE_GUIDED_ARMED = 216,
2752    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2753    MAV_MODE_AUTO_DISARMED = 92,
2754    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2755    MAV_MODE_AUTO_ARMED = 220,
2756    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2757    MAV_MODE_TEST_DISARMED = 66,
2758    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2759    MAV_MODE_TEST_ARMED = 194,
2760}
2761impl MavMode {
2762    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2763}
2764impl Default for MavMode {
2765    fn default() -> Self {
2766        Self::DEFAULT
2767    }
2768}
2769bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2770impl MavModeFlag {
2771    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2772}
2773impl Default for MavModeFlag {
2774    fn default() -> Self {
2775        Self::DEFAULT
2776    }
2777}
2778#[cfg_attr(feature = "ts", derive(TS))]
2779#[cfg_attr(feature = "ts", ts(export))]
2780#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2782#[cfg_attr(feature = "serde", serde(tag = "type"))]
2783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2784#[repr(u32)]
2785#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2786pub enum MavModeFlagDecodePosition {
2787    #[doc = "First bit:  10000000"]
2788    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2789    #[doc = "Second bit: 01000000"]
2790    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2791    #[doc = "Third bit:  00100000"]
2792    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2793    #[doc = "Fourth bit: 00010000"]
2794    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2795    #[doc = "Fifth bit:  00001000"]
2796    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2797    #[doc = "Sixth bit:   00000100"]
2798    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2799    #[doc = "Seventh bit: 00000010"]
2800    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2801    #[doc = "Eighth bit: 00000001"]
2802    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2803}
2804impl MavModeFlagDecodePosition {
2805    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2806}
2807impl Default for MavModeFlagDecodePosition {
2808    fn default() -> Self {
2809        Self::DEFAULT
2810    }
2811}
2812bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2813impl MavModeProperty {
2814    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2815}
2816impl Default for MavModeProperty {
2817    fn default() -> Self {
2818        Self::DEFAULT
2819    }
2820}
2821#[cfg_attr(feature = "ts", derive(TS))]
2822#[cfg_attr(feature = "ts", ts(export))]
2823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2825#[cfg_attr(feature = "serde", serde(tag = "type"))]
2826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2827#[repr(u32)]
2828#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2829#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2830pub enum MavMountMode {
2831    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2832    MAV_MOUNT_MODE_RETRACT = 0,
2833    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2834    MAV_MOUNT_MODE_NEUTRAL = 1,
2835    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2836    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2837    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2838    MAV_MOUNT_MODE_RC_TARGETING = 3,
2839    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2840    MAV_MOUNT_MODE_GPS_POINT = 4,
2841    #[doc = "Gimbal tracks system with specified system ID"]
2842    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2843    #[doc = "Gimbal tracks home position"]
2844    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2845}
2846impl MavMountMode {
2847    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2848}
2849impl Default for MavMountMode {
2850    fn default() -> Self {
2851        Self::DEFAULT
2852    }
2853}
2854#[cfg_attr(feature = "ts", derive(TS))]
2855#[cfg_attr(feature = "ts", ts(export))]
2856#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2858#[cfg_attr(feature = "serde", serde(tag = "type"))]
2859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2860#[repr(u32)]
2861pub enum MavOdidArmStatus {
2862    #[doc = "Passing arming checks."]
2863    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2864    #[doc = "Generic arming failure, see error string for details."]
2865    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2866}
2867impl MavOdidArmStatus {
2868    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2869}
2870impl Default for MavOdidArmStatus {
2871    fn default() -> Self {
2872        Self::DEFAULT
2873    }
2874}
2875#[cfg_attr(feature = "ts", derive(TS))]
2876#[cfg_attr(feature = "ts", ts(export))]
2877#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2879#[cfg_attr(feature = "serde", serde(tag = "type"))]
2880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2881#[repr(u32)]
2882pub enum MavOdidAuthType {
2883    #[doc = "No authentication type is specified."]
2884    MAV_ODID_AUTH_TYPE_NONE = 0,
2885    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2886    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2887    #[doc = "Signature for the Operator ID."]
2888    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2889    #[doc = "Signature for the entire message set."]
2890    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2891    #[doc = "Authentication is provided by Network Remote ID."]
2892    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2893    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2894    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2895}
2896impl MavOdidAuthType {
2897    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2898}
2899impl Default for MavOdidAuthType {
2900    fn default() -> Self {
2901        Self::DEFAULT
2902    }
2903}
2904#[cfg_attr(feature = "ts", derive(TS))]
2905#[cfg_attr(feature = "ts", ts(export))]
2906#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2908#[cfg_attr(feature = "serde", serde(tag = "type"))]
2909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2910#[repr(u32)]
2911pub enum MavOdidCategoryEu {
2912    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2913    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2914    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2915    MAV_ODID_CATEGORY_EU_OPEN = 1,
2916    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2917    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2918    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2919    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2920}
2921impl MavOdidCategoryEu {
2922    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2923}
2924impl Default for MavOdidCategoryEu {
2925    fn default() -> Self {
2926        Self::DEFAULT
2927    }
2928}
2929#[cfg_attr(feature = "ts", derive(TS))]
2930#[cfg_attr(feature = "ts", ts(export))]
2931#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2933#[cfg_attr(feature = "serde", serde(tag = "type"))]
2934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2935#[repr(u32)]
2936pub enum MavOdidClassEu {
2937    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2938    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2939    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2940    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2941    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2942    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2943    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2944    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2945    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2946    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2947    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2948    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2949    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2950    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2951    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2952    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2953}
2954impl MavOdidClassEu {
2955    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2956}
2957impl Default for MavOdidClassEu {
2958    fn default() -> Self {
2959        Self::DEFAULT
2960    }
2961}
2962#[cfg_attr(feature = "ts", derive(TS))]
2963#[cfg_attr(feature = "ts", ts(export))]
2964#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2966#[cfg_attr(feature = "serde", serde(tag = "type"))]
2967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2968#[repr(u32)]
2969pub enum MavOdidClassificationType {
2970    #[doc = "The classification type for the UA is undeclared."]
2971    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2972    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2973    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2974}
2975impl MavOdidClassificationType {
2976    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2977}
2978impl Default for MavOdidClassificationType {
2979    fn default() -> Self {
2980        Self::DEFAULT
2981    }
2982}
2983#[cfg_attr(feature = "ts", derive(TS))]
2984#[cfg_attr(feature = "ts", ts(export))]
2985#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2987#[cfg_attr(feature = "serde", serde(tag = "type"))]
2988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2989#[repr(u32)]
2990pub enum MavOdidDescType {
2991    #[doc = "Optional free-form text description of the purpose of the flight."]
2992    MAV_ODID_DESC_TYPE_TEXT = 0,
2993    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2994    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2995    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2996    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2997}
2998impl MavOdidDescType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3000}
3001impl Default for MavOdidDescType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidHeightRef {
3014    #[doc = "The height field is relative to the take-off location."]
3015    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3016    #[doc = "The height field is relative to ground."]
3017    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3018}
3019impl MavOdidHeightRef {
3020    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3021}
3022impl Default for MavOdidHeightRef {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidHorAcc {
3035    #[doc = "The horizontal accuracy is unknown."]
3036    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3037    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3038    MAV_ODID_HOR_ACC_10NM = 1,
3039    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3040    MAV_ODID_HOR_ACC_4NM = 2,
3041    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3042    MAV_ODID_HOR_ACC_2NM = 3,
3043    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3044    MAV_ODID_HOR_ACC_1NM = 4,
3045    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3046    MAV_ODID_HOR_ACC_0_5NM = 5,
3047    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3048    MAV_ODID_HOR_ACC_0_3NM = 6,
3049    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3050    MAV_ODID_HOR_ACC_0_1NM = 7,
3051    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3052    MAV_ODID_HOR_ACC_0_05NM = 8,
3053    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3054    MAV_ODID_HOR_ACC_30_METER = 9,
3055    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3056    MAV_ODID_HOR_ACC_10_METER = 10,
3057    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3058    MAV_ODID_HOR_ACC_3_METER = 11,
3059    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3060    MAV_ODID_HOR_ACC_1_METER = 12,
3061}
3062impl MavOdidHorAcc {
3063    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3064}
3065impl Default for MavOdidHorAcc {
3066    fn default() -> Self {
3067        Self::DEFAULT
3068    }
3069}
3070#[cfg_attr(feature = "ts", derive(TS))]
3071#[cfg_attr(feature = "ts", ts(export))]
3072#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3074#[cfg_attr(feature = "serde", serde(tag = "type"))]
3075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3076#[repr(u32)]
3077pub enum MavOdidIdType {
3078    #[doc = "No type defined."]
3079    MAV_ODID_ID_TYPE_NONE = 0,
3080    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3081    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3082    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3083    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3084    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3085    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3086    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3087    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3088}
3089impl MavOdidIdType {
3090    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3091}
3092impl Default for MavOdidIdType {
3093    fn default() -> Self {
3094        Self::DEFAULT
3095    }
3096}
3097#[cfg_attr(feature = "ts", derive(TS))]
3098#[cfg_attr(feature = "ts", ts(export))]
3099#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3101#[cfg_attr(feature = "serde", serde(tag = "type"))]
3102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3103#[repr(u32)]
3104pub enum MavOdidOperatorIdType {
3105    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3106    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3107}
3108impl MavOdidOperatorIdType {
3109    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3110}
3111impl Default for MavOdidOperatorIdType {
3112    fn default() -> Self {
3113        Self::DEFAULT
3114    }
3115}
3116#[cfg_attr(feature = "ts", derive(TS))]
3117#[cfg_attr(feature = "ts", ts(export))]
3118#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3120#[cfg_attr(feature = "serde", serde(tag = "type"))]
3121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3122#[repr(u32)]
3123pub enum MavOdidOperatorLocationType {
3124    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3125    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3126    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3127    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3128    #[doc = "The location/altitude of the operator are fixed values."]
3129    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3130}
3131impl MavOdidOperatorLocationType {
3132    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3133}
3134impl Default for MavOdidOperatorLocationType {
3135    fn default() -> Self {
3136        Self::DEFAULT
3137    }
3138}
3139#[cfg_attr(feature = "ts", derive(TS))]
3140#[cfg_attr(feature = "ts", ts(export))]
3141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3143#[cfg_attr(feature = "serde", serde(tag = "type"))]
3144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3145#[repr(u32)]
3146pub enum MavOdidSpeedAcc {
3147    #[doc = "The speed accuracy is unknown."]
3148    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3149    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3150    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3151    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3152    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3153    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3154    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3155    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3156    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3157}
3158impl MavOdidSpeedAcc {
3159    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3160}
3161impl Default for MavOdidSpeedAcc {
3162    fn default() -> Self {
3163        Self::DEFAULT
3164    }
3165}
3166#[cfg_attr(feature = "ts", derive(TS))]
3167#[cfg_attr(feature = "ts", ts(export))]
3168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3170#[cfg_attr(feature = "serde", serde(tag = "type"))]
3171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3172#[repr(u32)]
3173pub enum MavOdidStatus {
3174    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3175    MAV_ODID_STATUS_UNDECLARED = 0,
3176    #[doc = "The UA is on the ground."]
3177    MAV_ODID_STATUS_GROUND = 1,
3178    #[doc = "The UA is in the air."]
3179    MAV_ODID_STATUS_AIRBORNE = 2,
3180    #[doc = "The UA is having an emergency."]
3181    MAV_ODID_STATUS_EMERGENCY = 3,
3182    #[doc = "The remote ID system is failing or unreliable in some way."]
3183    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3184}
3185impl MavOdidStatus {
3186    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3187}
3188impl Default for MavOdidStatus {
3189    fn default() -> Self {
3190        Self::DEFAULT
3191    }
3192}
3193#[cfg_attr(feature = "ts", derive(TS))]
3194#[cfg_attr(feature = "ts", ts(export))]
3195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3197#[cfg_attr(feature = "serde", serde(tag = "type"))]
3198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3199#[repr(u32)]
3200pub enum MavOdidTimeAcc {
3201    #[doc = "The timestamp accuracy is unknown."]
3202    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3203    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3204    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3205    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3206    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3207    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3208    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3209    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3210    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3211    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3212    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3213    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3214    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3215    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3216    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3217    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3218    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3219    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3220    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3221    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3222    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3223    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3224    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3225    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3226    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3227    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3228    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3229    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3230    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3231    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3232    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3233}
3234impl MavOdidTimeAcc {
3235    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3236}
3237impl Default for MavOdidTimeAcc {
3238    fn default() -> Self {
3239        Self::DEFAULT
3240    }
3241}
3242#[cfg_attr(feature = "ts", derive(TS))]
3243#[cfg_attr(feature = "ts", ts(export))]
3244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3246#[cfg_attr(feature = "serde", serde(tag = "type"))]
3247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3248#[repr(u32)]
3249pub enum MavOdidUaType {
3250    #[doc = "No UA (Unmanned Aircraft) type defined."]
3251    MAV_ODID_UA_TYPE_NONE = 0,
3252    #[doc = "Aeroplane/Airplane. Fixed wing."]
3253    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3254    #[doc = "Helicopter or multirotor."]
3255    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3256    #[doc = "Gyroplane."]
3257    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3258    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3259    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3260    #[doc = "Ornithopter."]
3261    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3262    #[doc = "Glider."]
3263    MAV_ODID_UA_TYPE_GLIDER = 6,
3264    #[doc = "Kite."]
3265    MAV_ODID_UA_TYPE_KITE = 7,
3266    #[doc = "Free Balloon."]
3267    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3268    #[doc = "Captive Balloon."]
3269    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3270    #[doc = "Airship. E.g. a blimp."]
3271    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3272    #[doc = "Free Fall/Parachute (unpowered)."]
3273    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3274    #[doc = "Rocket."]
3275    MAV_ODID_UA_TYPE_ROCKET = 12,
3276    #[doc = "Tethered powered aircraft."]
3277    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3278    #[doc = "Ground Obstacle."]
3279    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3280    #[doc = "Other type of aircraft not listed earlier."]
3281    MAV_ODID_UA_TYPE_OTHER = 15,
3282}
3283impl MavOdidUaType {
3284    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3285}
3286impl Default for MavOdidUaType {
3287    fn default() -> Self {
3288        Self::DEFAULT
3289    }
3290}
3291#[cfg_attr(feature = "ts", derive(TS))]
3292#[cfg_attr(feature = "ts", ts(export))]
3293#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3295#[cfg_attr(feature = "serde", serde(tag = "type"))]
3296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3297#[repr(u32)]
3298pub enum MavOdidVerAcc {
3299    #[doc = "The vertical accuracy is unknown."]
3300    MAV_ODID_VER_ACC_UNKNOWN = 0,
3301    #[doc = "The vertical accuracy is smaller than 150 meter."]
3302    MAV_ODID_VER_ACC_150_METER = 1,
3303    #[doc = "The vertical accuracy is smaller than 45 meter."]
3304    MAV_ODID_VER_ACC_45_METER = 2,
3305    #[doc = "The vertical accuracy is smaller than 25 meter."]
3306    MAV_ODID_VER_ACC_25_METER = 3,
3307    #[doc = "The vertical accuracy is smaller than 10 meter."]
3308    MAV_ODID_VER_ACC_10_METER = 4,
3309    #[doc = "The vertical accuracy is smaller than 3 meter."]
3310    MAV_ODID_VER_ACC_3_METER = 5,
3311    #[doc = "The vertical accuracy is smaller than 1 meter."]
3312    MAV_ODID_VER_ACC_1_METER = 6,
3313}
3314impl MavOdidVerAcc {
3315    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3316}
3317impl Default for MavOdidVerAcc {
3318    fn default() -> Self {
3319        Self::DEFAULT
3320    }
3321}
3322#[cfg_attr(feature = "ts", derive(TS))]
3323#[cfg_attr(feature = "ts", ts(export))]
3324#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3326#[cfg_attr(feature = "serde", serde(tag = "type"))]
3327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3328#[repr(u32)]
3329#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3330pub enum MavParamExtType {
3331    #[doc = "8-bit unsigned integer"]
3332    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3333    #[doc = "8-bit signed integer"]
3334    MAV_PARAM_EXT_TYPE_INT8 = 2,
3335    #[doc = "16-bit unsigned integer"]
3336    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3337    #[doc = "16-bit signed integer"]
3338    MAV_PARAM_EXT_TYPE_INT16 = 4,
3339    #[doc = "32-bit unsigned integer"]
3340    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3341    #[doc = "32-bit signed integer"]
3342    MAV_PARAM_EXT_TYPE_INT32 = 6,
3343    #[doc = "64-bit unsigned integer"]
3344    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3345    #[doc = "64-bit signed integer"]
3346    MAV_PARAM_EXT_TYPE_INT64 = 8,
3347    #[doc = "32-bit floating-point"]
3348    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3349    #[doc = "64-bit floating-point"]
3350    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3351    #[doc = "Custom Type"]
3352    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3353}
3354impl MavParamExtType {
3355    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3356}
3357impl Default for MavParamExtType {
3358    fn default() -> Self {
3359        Self::DEFAULT
3360    }
3361}
3362#[cfg_attr(feature = "ts", derive(TS))]
3363#[cfg_attr(feature = "ts", ts(export))]
3364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3366#[cfg_attr(feature = "serde", serde(tag = "type"))]
3367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3368#[repr(u32)]
3369#[doc = "Specifies the datatype of a MAVLink parameter."]
3370pub enum MavParamType {
3371    #[doc = "8-bit unsigned integer"]
3372    MAV_PARAM_TYPE_UINT8 = 1,
3373    #[doc = "8-bit signed integer"]
3374    MAV_PARAM_TYPE_INT8 = 2,
3375    #[doc = "16-bit unsigned integer"]
3376    MAV_PARAM_TYPE_UINT16 = 3,
3377    #[doc = "16-bit signed integer"]
3378    MAV_PARAM_TYPE_INT16 = 4,
3379    #[doc = "32-bit unsigned integer"]
3380    MAV_PARAM_TYPE_UINT32 = 5,
3381    #[doc = "32-bit signed integer"]
3382    MAV_PARAM_TYPE_INT32 = 6,
3383    #[doc = "64-bit unsigned integer"]
3384    MAV_PARAM_TYPE_UINT64 = 7,
3385    #[doc = "64-bit signed integer"]
3386    MAV_PARAM_TYPE_INT64 = 8,
3387    #[doc = "32-bit floating-point"]
3388    MAV_PARAM_TYPE_REAL32 = 9,
3389    #[doc = "64-bit floating-point"]
3390    MAV_PARAM_TYPE_REAL64 = 10,
3391}
3392impl MavParamType {
3393    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3394}
3395impl Default for MavParamType {
3396    fn default() -> Self {
3397        Self::DEFAULT
3398    }
3399}
3400bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3401impl MavPowerStatus {
3402    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3403}
3404impl Default for MavPowerStatus {
3405    fn default() -> Self {
3406        Self::DEFAULT
3407    }
3408}
3409bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3410impl MavProtocolCapability {
3411    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3412}
3413impl Default for MavProtocolCapability {
3414    fn default() -> Self {
3415        Self::DEFAULT
3416    }
3417}
3418#[cfg_attr(feature = "ts", derive(TS))]
3419#[cfg_attr(feature = "ts", ts(export))]
3420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3422#[cfg_attr(feature = "serde", serde(tag = "type"))]
3423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3424#[repr(u32)]
3425#[doc = "Result from a MAVLink command (MAV_CMD)"]
3426pub enum MavResult {
3427    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3428    MAV_RESULT_ACCEPTED = 0,
3429    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3430    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3431    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3432    MAV_RESULT_DENIED = 2,
3433    #[doc = "Command is not supported (unknown)."]
3434    MAV_RESULT_UNSUPPORTED = 3,
3435    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3436    MAV_RESULT_FAILED = 4,
3437    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3438    MAV_RESULT_IN_PROGRESS = 5,
3439    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3440    MAV_RESULT_CANCELLED = 6,
3441    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3442    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3443    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3444    MAV_RESULT_COMMAND_INT_ONLY = 8,
3445    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3446    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3447}
3448impl MavResult {
3449    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3450}
3451impl Default for MavResult {
3452    fn default() -> Self {
3453        Self::DEFAULT
3454    }
3455}
3456#[cfg_attr(feature = "ts", derive(TS))]
3457#[cfg_attr(feature = "ts", ts(export))]
3458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3460#[cfg_attr(feature = "serde", serde(tag = "type"))]
3461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3462#[repr(u32)]
3463#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3464#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3465pub enum MavRoi {
3466    #[doc = "No region of interest."]
3467    MAV_ROI_NONE = 0,
3468    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3469    MAV_ROI_WPNEXT = 1,
3470    #[doc = "Point toward given waypoint."]
3471    MAV_ROI_WPINDEX = 2,
3472    #[doc = "Point toward fixed location."]
3473    MAV_ROI_LOCATION = 3,
3474    #[doc = "Point toward of given id."]
3475    MAV_ROI_TARGET = 4,
3476}
3477impl MavRoi {
3478    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3479}
3480impl Default for MavRoi {
3481    fn default() -> Self {
3482        Self::DEFAULT
3483    }
3484}
3485#[cfg_attr(feature = "ts", derive(TS))]
3486#[cfg_attr(feature = "ts", ts(export))]
3487#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3489#[cfg_attr(feature = "serde", serde(tag = "type"))]
3490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3491#[repr(u32)]
3492#[doc = "Enumeration of sensor orientation, according to its rotations"]
3493pub enum MavSensorOrientation {
3494    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3495    MAV_SENSOR_ROTATION_NONE = 0,
3496    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3497    MAV_SENSOR_ROTATION_YAW_45 = 1,
3498    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3499    MAV_SENSOR_ROTATION_YAW_90 = 2,
3500    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3501    MAV_SENSOR_ROTATION_YAW_135 = 3,
3502    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3503    MAV_SENSOR_ROTATION_YAW_180 = 4,
3504    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3505    MAV_SENSOR_ROTATION_YAW_225 = 5,
3506    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3507    MAV_SENSOR_ROTATION_YAW_270 = 6,
3508    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3509    MAV_SENSOR_ROTATION_YAW_315 = 7,
3510    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3511    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3512    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3513    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3514    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3515    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3516    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3517    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3518    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3519    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3520    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3521    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3522    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3523    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3524    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3525    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3526    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3527    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3528    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3529    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3530    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3531    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3532    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3533    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3534    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3535    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3536    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3537    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3538    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3539    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3540    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3541    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3542    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3543    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3544    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3545    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3546    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3547    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3548    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3549    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3550    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3551    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3552    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3553    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3554    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3555    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3556    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3557    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3558    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3559    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3560    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3561    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3562    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3563    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3564    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3565    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3566    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3567    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3568    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3569    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3570    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3571    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3572    #[doc = "Pitch: 315"]
3573    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3574    #[doc = "Roll: 90, Pitch: 315"]
3575    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3576    #[doc = "Custom orientation"]
3577    MAV_SENSOR_ROTATION_CUSTOM = 100,
3578}
3579impl MavSensorOrientation {
3580    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3581}
3582impl Default for MavSensorOrientation {
3583    fn default() -> Self {
3584        Self::DEFAULT
3585    }
3586}
3587#[cfg_attr(feature = "ts", derive(TS))]
3588#[cfg_attr(feature = "ts", ts(export))]
3589#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3591#[cfg_attr(feature = "serde", serde(tag = "type"))]
3592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3593#[repr(u32)]
3594#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3595pub enum MavSeverity {
3596    #[doc = "System is unusable. This is a \"panic\" condition."]
3597    MAV_SEVERITY_EMERGENCY = 0,
3598    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3599    MAV_SEVERITY_ALERT = 1,
3600    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3601    MAV_SEVERITY_CRITICAL = 2,
3602    #[doc = "Indicates an error in secondary/redundant systems."]
3603    MAV_SEVERITY_ERROR = 3,
3604    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3605    MAV_SEVERITY_WARNING = 4,
3606    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3607    MAV_SEVERITY_NOTICE = 5,
3608    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3609    MAV_SEVERITY_INFO = 6,
3610    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3611    MAV_SEVERITY_DEBUG = 7,
3612}
3613impl MavSeverity {
3614    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3615}
3616impl Default for MavSeverity {
3617    fn default() -> Self {
3618        Self::DEFAULT
3619    }
3620}
3621#[cfg_attr(feature = "ts", derive(TS))]
3622#[cfg_attr(feature = "ts", ts(export))]
3623#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3625#[cfg_attr(feature = "serde", serde(tag = "type"))]
3626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3627#[repr(u32)]
3628#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3629pub enum MavStandardMode {
3630    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3631    MAV_STANDARD_MODE_NON_STANDARD = 0,
3632    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3633    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3634    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3635    MAV_STANDARD_MODE_ORBIT = 2,
3636    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3637    MAV_STANDARD_MODE_CRUISE = 3,
3638    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3639    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3640    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3641    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3642    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3643    MAV_STANDARD_MODE_MISSION = 6,
3644    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3645    MAV_STANDARD_MODE_LAND = 7,
3646    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3647    MAV_STANDARD_MODE_TAKEOFF = 8,
3648}
3649impl MavStandardMode {
3650    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3651}
3652impl Default for MavStandardMode {
3653    fn default() -> Self {
3654        Self::DEFAULT
3655    }
3656}
3657#[cfg_attr(feature = "ts", derive(TS))]
3658#[cfg_attr(feature = "ts", ts(export))]
3659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3661#[cfg_attr(feature = "serde", serde(tag = "type"))]
3662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3663#[repr(u32)]
3664pub enum MavState {
3665    #[doc = "Uninitialized system, state is unknown."]
3666    MAV_STATE_UNINIT = 0,
3667    #[doc = "System is booting up."]
3668    MAV_STATE_BOOT = 1,
3669    #[doc = "System is calibrating and not flight-ready."]
3670    MAV_STATE_CALIBRATING = 2,
3671    #[doc = "System is grounded and on standby. It can be launched any time."]
3672    MAV_STATE_STANDBY = 3,
3673    #[doc = "System is active and might be already airborne. Motors are engaged."]
3674    MAV_STATE_ACTIVE = 4,
3675    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3676    MAV_STATE_CRITICAL = 5,
3677    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3678    MAV_STATE_EMERGENCY = 6,
3679    #[doc = "System just initialized its power-down sequence, will shut down now."]
3680    MAV_STATE_POWEROFF = 7,
3681    #[doc = "System is terminating itself (failsafe or commanded)."]
3682    MAV_STATE_FLIGHT_TERMINATION = 8,
3683}
3684impl MavState {
3685    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3686}
3687impl Default for MavState {
3688    fn default() -> Self {
3689        Self::DEFAULT
3690    }
3691}
3692bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3693impl MavSysStatusSensor {
3694    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3695}
3696impl Default for MavSysStatusSensor {
3697    fn default() -> Self {
3698        Self::DEFAULT
3699    }
3700}
3701bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3702impl MavSysStatusSensorExtended {
3703    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3704}
3705impl Default for MavSysStatusSensorExtended {
3706    fn default() -> Self {
3707        Self::DEFAULT
3708    }
3709}
3710#[cfg_attr(feature = "ts", derive(TS))]
3711#[cfg_attr(feature = "ts", ts(export))]
3712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3714#[cfg_attr(feature = "serde", serde(tag = "type"))]
3715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3716#[repr(u32)]
3717pub enum MavTunnelPayloadType {
3718    #[doc = "Encoding of payload unknown."]
3719    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3720    #[doc = "Registered for STorM32 gimbal controller."]
3721    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3722    #[doc = "Registered for STorM32 gimbal controller."]
3723    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3724    #[doc = "Registered for STorM32 gimbal controller."]
3725    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3726    #[doc = "Registered for STorM32 gimbal controller."]
3727    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3728    #[doc = "Registered for STorM32 gimbal controller."]
3729    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3730    #[doc = "Registered for STorM32 gimbal controller."]
3731    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3732    #[doc = "Registered for STorM32 gimbal controller."]
3733    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3734    #[doc = "Registered for STorM32 gimbal controller."]
3735    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3736    #[doc = "Registered for STorM32 gimbal controller."]
3737    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3738    #[doc = "Registered for STorM32 gimbal controller."]
3739    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3740    #[doc = "Registered for ModalAI remote OSD protocol."]
3741    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3742    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3743    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3744    #[doc = "Registered for ModalAI vendor use."]
3745    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3746}
3747impl MavTunnelPayloadType {
3748    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3749}
3750impl Default for MavTunnelPayloadType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3763pub enum MavType {
3764    #[doc = "Generic micro air vehicle"]
3765    MAV_TYPE_GENERIC = 0,
3766    #[doc = "Fixed wing aircraft."]
3767    MAV_TYPE_FIXED_WING = 1,
3768    #[doc = "Quadrotor"]
3769    MAV_TYPE_QUADROTOR = 2,
3770    #[doc = "Coaxial helicopter"]
3771    MAV_TYPE_COAXIAL = 3,
3772    #[doc = "Normal helicopter with tail rotor."]
3773    MAV_TYPE_HELICOPTER = 4,
3774    #[doc = "Ground installation"]
3775    MAV_TYPE_ANTENNA_TRACKER = 5,
3776    #[doc = "Operator control unit / ground control station"]
3777    MAV_TYPE_GCS = 6,
3778    #[doc = "Airship, controlled"]
3779    MAV_TYPE_AIRSHIP = 7,
3780    #[doc = "Free balloon, uncontrolled"]
3781    MAV_TYPE_FREE_BALLOON = 8,
3782    #[doc = "Rocket"]
3783    MAV_TYPE_ROCKET = 9,
3784    #[doc = "Ground rover"]
3785    MAV_TYPE_GROUND_ROVER = 10,
3786    #[doc = "Surface vessel, boat, ship"]
3787    MAV_TYPE_SURFACE_BOAT = 11,
3788    #[doc = "Submarine"]
3789    MAV_TYPE_SUBMARINE = 12,
3790    #[doc = "Hexarotor"]
3791    MAV_TYPE_HEXAROTOR = 13,
3792    #[doc = "Octorotor"]
3793    MAV_TYPE_OCTOROTOR = 14,
3794    #[doc = "Tricopter"]
3795    MAV_TYPE_TRICOPTER = 15,
3796    #[doc = "Flapping wing"]
3797    MAV_TYPE_FLAPPING_WING = 16,
3798    #[doc = "Kite"]
3799    MAV_TYPE_KITE = 17,
3800    #[doc = "Onboard companion controller"]
3801    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3802    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3803    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3804    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3805    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3806    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3807    MAV_TYPE_VTOL_TILTROTOR = 21,
3808    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3809    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3810    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3811    MAV_TYPE_VTOL_TAILSITTER = 23,
3812    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3813    MAV_TYPE_VTOL_TILTWING = 24,
3814    #[doc = "VTOL reserved 5"]
3815    MAV_TYPE_VTOL_RESERVED5 = 25,
3816    #[doc = "Gimbal"]
3817    MAV_TYPE_GIMBAL = 26,
3818    #[doc = "ADSB system"]
3819    MAV_TYPE_ADSB = 27,
3820    #[doc = "Steerable, nonrigid airfoil"]
3821    MAV_TYPE_PARAFOIL = 28,
3822    #[doc = "Dodecarotor"]
3823    MAV_TYPE_DODECAROTOR = 29,
3824    #[doc = "Camera"]
3825    MAV_TYPE_CAMERA = 30,
3826    #[doc = "Charging station"]
3827    MAV_TYPE_CHARGING_STATION = 31,
3828    #[doc = "FLARM collision avoidance system"]
3829    MAV_TYPE_FLARM = 32,
3830    #[doc = "Servo"]
3831    MAV_TYPE_SERVO = 33,
3832    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3833    MAV_TYPE_ODID = 34,
3834    #[doc = "Decarotor"]
3835    MAV_TYPE_DECAROTOR = 35,
3836    #[doc = "Battery"]
3837    MAV_TYPE_BATTERY = 36,
3838    #[doc = "Parachute"]
3839    MAV_TYPE_PARACHUTE = 37,
3840    #[doc = "Log"]
3841    MAV_TYPE_LOG = 38,
3842    #[doc = "OSD"]
3843    MAV_TYPE_OSD = 39,
3844    #[doc = "IMU"]
3845    MAV_TYPE_IMU = 40,
3846    #[doc = "GPS"]
3847    MAV_TYPE_GPS = 41,
3848    #[doc = "Winch"]
3849    MAV_TYPE_WINCH = 42,
3850    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3851    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3852    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3853    MAV_TYPE_ILLUMINATOR = 44,
3854    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3855    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3856}
3857impl MavType {
3858    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3859}
3860impl Default for MavType {
3861    fn default() -> Self {
3862        Self::DEFAULT
3863    }
3864}
3865#[cfg_attr(feature = "ts", derive(TS))]
3866#[cfg_attr(feature = "ts", ts(export))]
3867#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3869#[cfg_attr(feature = "serde", serde(tag = "type"))]
3870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3871#[repr(u32)]
3872#[doc = "Enumeration of VTOL states"]
3873pub enum MavVtolState {
3874    #[doc = "MAV is not configured as VTOL"]
3875    MAV_VTOL_STATE_UNDEFINED = 0,
3876    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3877    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3878    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3879    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3880    #[doc = "VTOL is in multicopter state"]
3881    MAV_VTOL_STATE_MC = 3,
3882    #[doc = "VTOL is in fixed-wing state"]
3883    MAV_VTOL_STATE_FW = 4,
3884}
3885impl MavVtolState {
3886    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3887}
3888impl Default for MavVtolState {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3894impl MavWinchStatusFlag {
3895    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3896}
3897impl Default for MavWinchStatusFlag {
3898    fn default() -> Self {
3899        Self::DEFAULT
3900    }
3901}
3902#[cfg_attr(feature = "ts", derive(TS))]
3903#[cfg_attr(feature = "ts", ts(export))]
3904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3906#[cfg_attr(feature = "serde", serde(tag = "type"))]
3907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3908#[repr(u32)]
3909pub enum MavlinkDataStreamType {
3910    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3911    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3912    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3913    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3914    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3915    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3916}
3917impl MavlinkDataStreamType {
3918    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3919}
3920impl Default for MavlinkDataStreamType {
3921    fn default() -> Self {
3922        Self::DEFAULT
3923    }
3924}
3925#[cfg_attr(feature = "ts", derive(TS))]
3926#[cfg_attr(feature = "ts", ts(export))]
3927#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3929#[cfg_attr(feature = "serde", serde(tag = "type"))]
3930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3931#[repr(u32)]
3932#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3933pub enum MissionState {
3934    #[doc = "The mission status reporting is not supported."]
3935    MISSION_STATE_UNKNOWN = 0,
3936    #[doc = "No mission on the vehicle."]
3937    MISSION_STATE_NO_MISSION = 1,
3938    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3939    MISSION_STATE_NOT_STARTED = 2,
3940    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3941    MISSION_STATE_ACTIVE = 3,
3942    #[doc = "Mission is paused when in auto mode."]
3943    MISSION_STATE_PAUSED = 4,
3944    #[doc = "Mission has executed all mission items."]
3945    MISSION_STATE_COMPLETE = 5,
3946}
3947impl MissionState {
3948    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3949}
3950impl Default for MissionState {
3951    fn default() -> Self {
3952        Self::DEFAULT
3953    }
3954}
3955#[cfg_attr(feature = "ts", derive(TS))]
3956#[cfg_attr(feature = "ts", ts(export))]
3957#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3959#[cfg_attr(feature = "serde", serde(tag = "type"))]
3960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3961#[repr(u32)]
3962#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3963pub enum MotorTestOrder {
3964    #[doc = "Default autopilot motor test method."]
3965    MOTOR_TEST_ORDER_DEFAULT = 0,
3966    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3967    MOTOR_TEST_ORDER_SEQUENCE = 1,
3968    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3969    MOTOR_TEST_ORDER_BOARD = 2,
3970}
3971impl MotorTestOrder {
3972    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3973}
3974impl Default for MotorTestOrder {
3975    fn default() -> Self {
3976        Self::DEFAULT
3977    }
3978}
3979#[cfg_attr(feature = "ts", derive(TS))]
3980#[cfg_attr(feature = "ts", ts(export))]
3981#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3983#[cfg_attr(feature = "serde", serde(tag = "type"))]
3984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3985#[repr(u32)]
3986#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3987pub enum MotorTestThrottleType {
3988    #[doc = "Throttle as a percentage (0 ~ 100)"]
3989    MOTOR_TEST_THROTTLE_PERCENT = 0,
3990    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3991    MOTOR_TEST_THROTTLE_PWM = 1,
3992    #[doc = "Throttle pass-through from pilot's transmitter."]
3993    MOTOR_TEST_THROTTLE_PILOT = 2,
3994    #[doc = "Per-motor compass calibration test."]
3995    MOTOR_TEST_COMPASS_CAL = 3,
3996}
3997impl MotorTestThrottleType {
3998    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3999}
4000impl Default for MotorTestThrottleType {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012pub enum NavVtolLandOptions {
4013    #[doc = "Default autopilot landing behaviour."]
4014    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4015    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4016    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4017    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4018    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4019}
4020impl NavVtolLandOptions {
4021    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4022}
4023impl Default for NavVtolLandOptions {
4024    fn default() -> Self {
4025        Self::DEFAULT
4026    }
4027}
4028#[cfg_attr(feature = "ts", derive(TS))]
4029#[cfg_attr(feature = "ts", ts(export))]
4030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4032#[cfg_attr(feature = "serde", serde(tag = "type"))]
4033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4034#[repr(u32)]
4035#[doc = "Yaw behaviour during orbit flight."]
4036pub enum OrbitYawBehaviour {
4037    #[doc = "Vehicle front points to the center (default)."]
4038    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4039    #[doc = "Vehicle front holds heading when message received."]
4040    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4041    #[doc = "Yaw uncontrolled."]
4042    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4043    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4044    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4045    #[doc = "Yaw controlled by RC input."]
4046    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4047    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4048    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4049}
4050impl OrbitYawBehaviour {
4051    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4052}
4053impl Default for OrbitYawBehaviour {
4054    fn default() -> Self {
4055        Self::DEFAULT
4056    }
4057}
4058#[cfg_attr(feature = "ts", derive(TS))]
4059#[cfg_attr(feature = "ts", ts(export))]
4060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4062#[cfg_attr(feature = "serde", serde(tag = "type"))]
4063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4064#[repr(u32)]
4065#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4066pub enum ParachuteAction {
4067    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4068    PARACHUTE_DISABLE = 0,
4069    #[doc = "Enable auto-release of parachute."]
4070    PARACHUTE_ENABLE = 1,
4071    #[doc = "Release parachute and kill motors."]
4072    PARACHUTE_RELEASE = 2,
4073}
4074impl ParachuteAction {
4075    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4076}
4077impl Default for ParachuteAction {
4078    fn default() -> Self {
4079        Self::DEFAULT
4080    }
4081}
4082#[cfg_attr(feature = "ts", derive(TS))]
4083#[cfg_attr(feature = "ts", ts(export))]
4084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4086#[cfg_attr(feature = "serde", serde(tag = "type"))]
4087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4088#[repr(u32)]
4089#[doc = "Result from PARAM_EXT_SET message."]
4090pub enum ParamAck {
4091    #[doc = "Parameter value ACCEPTED and SET"]
4092    PARAM_ACK_ACCEPTED = 0,
4093    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4094    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4095    #[doc = "Parameter failed to set"]
4096    PARAM_ACK_FAILED = 2,
4097    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4098    PARAM_ACK_IN_PROGRESS = 3,
4099}
4100impl ParamAck {
4101    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4102}
4103impl Default for ParamAck {
4104    fn default() -> Self {
4105        Self::DEFAULT
4106    }
4107}
4108bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4109impl PositionTargetTypemask {
4110    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4111}
4112impl Default for PositionTargetTypemask {
4113    fn default() -> Self {
4114        Self::DEFAULT
4115    }
4116}
4117#[cfg_attr(feature = "ts", derive(TS))]
4118#[cfg_attr(feature = "ts", ts(export))]
4119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4121#[cfg_attr(feature = "serde", serde(tag = "type"))]
4122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4123#[repr(u32)]
4124#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4125pub enum PrecisionLandMode {
4126    #[doc = "Normal (non-precision) landing."]
4127    PRECISION_LAND_MODE_DISABLED = 0,
4128    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4129    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4130    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4131    PRECISION_LAND_MODE_REQUIRED = 2,
4132}
4133impl PrecisionLandMode {
4134    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4135}
4136impl Default for PrecisionLandMode {
4137    fn default() -> Self {
4138        Self::DEFAULT
4139    }
4140}
4141#[cfg_attr(feature = "ts", derive(TS))]
4142#[cfg_attr(feature = "ts", ts(export))]
4143#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4145#[cfg_attr(feature = "serde", serde(tag = "type"))]
4146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4147#[repr(u32)]
4148#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4149pub enum PreflightStorageMissionAction {
4150    #[doc = "Read current mission data from persistent storage"]
4151    MISSION_READ_PERSISTENT = 0,
4152    #[doc = "Write current mission data to persistent storage"]
4153    MISSION_WRITE_PERSISTENT = 1,
4154    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4155    MISSION_RESET_DEFAULT = 2,
4156}
4157impl PreflightStorageMissionAction {
4158    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4159}
4160impl Default for PreflightStorageMissionAction {
4161    fn default() -> Self {
4162        Self::DEFAULT
4163    }
4164}
4165#[cfg_attr(feature = "ts", derive(TS))]
4166#[cfg_attr(feature = "ts", ts(export))]
4167#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4169#[cfg_attr(feature = "serde", serde(tag = "type"))]
4170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4171#[repr(u32)]
4172#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4173pub enum PreflightStorageParameterAction {
4174    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4175    PARAM_READ_PERSISTENT = 0,
4176    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4177    PARAM_WRITE_PERSISTENT = 1,
4178    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4179    PARAM_RESET_CONFIG_DEFAULT = 2,
4180    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4181    PARAM_RESET_SENSOR_DEFAULT = 3,
4182    #[doc = "Reset all parameters, including operation counters, to default values"]
4183    PARAM_RESET_ALL_DEFAULT = 4,
4184}
4185impl PreflightStorageParameterAction {
4186    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4187}
4188impl Default for PreflightStorageParameterAction {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4201pub enum RcSubType {
4202    #[doc = "Spektrum DSM2"]
4203    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4204    #[doc = "Spektrum DSMX"]
4205    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4206    #[doc = "Spektrum DSMX8"]
4207    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4208}
4209impl RcSubType {
4210    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4211}
4212impl Default for RcSubType {
4213    fn default() -> Self {
4214        Self::DEFAULT
4215    }
4216}
4217#[cfg_attr(feature = "ts", derive(TS))]
4218#[cfg_attr(feature = "ts", ts(export))]
4219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4221#[cfg_attr(feature = "serde", serde(tag = "type"))]
4222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4223#[repr(u32)]
4224#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4225pub enum RcType {
4226    #[doc = "Spektrum"]
4227    RC_TYPE_SPEKTRUM = 0,
4228    #[doc = "CRSF"]
4229    RC_TYPE_CRSF = 1,
4230}
4231impl RcType {
4232    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4233}
4234impl Default for RcType {
4235    fn default() -> Self {
4236        Self::DEFAULT
4237    }
4238}
4239#[cfg_attr(feature = "ts", derive(TS))]
4240#[cfg_attr(feature = "ts", ts(export))]
4241#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4243#[cfg_attr(feature = "serde", serde(tag = "type"))]
4244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4245#[repr(u32)]
4246#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4247pub enum RebootShutdownConditions {
4248    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4249    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4250    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4251    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4252}
4253impl RebootShutdownConditions {
4254    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4255}
4256impl Default for RebootShutdownConditions {
4257    fn default() -> Self {
4258        Self::DEFAULT
4259    }
4260}
4261#[cfg_attr(feature = "ts", derive(TS))]
4262#[cfg_attr(feature = "ts", ts(export))]
4263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4265#[cfg_attr(feature = "serde", serde(tag = "type"))]
4266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4267#[repr(u32)]
4268#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4269pub enum RtkBaselineCoordinateSystem {
4270    #[doc = "Earth-centered, Earth-fixed"]
4271    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4272    #[doc = "RTK basestation centered, north, east, down"]
4273    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4274}
4275impl RtkBaselineCoordinateSystem {
4276    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4277}
4278impl Default for RtkBaselineCoordinateSystem {
4279    fn default() -> Self {
4280        Self::DEFAULT
4281    }
4282}
4283#[cfg_attr(feature = "ts", derive(TS))]
4284#[cfg_attr(feature = "ts", ts(export))]
4285#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4287#[cfg_attr(feature = "serde", serde(tag = "type"))]
4288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4289#[repr(u32)]
4290#[doc = "Possible safety switch states."]
4291pub enum SafetySwitchState {
4292    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4293    SAFETY_SWITCH_STATE_SAFE = 0,
4294    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4295    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4296}
4297impl SafetySwitchState {
4298    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4299}
4300impl Default for SafetySwitchState {
4301    fn default() -> Self {
4302        Self::DEFAULT
4303    }
4304}
4305#[cfg_attr(feature = "ts", derive(TS))]
4306#[cfg_attr(feature = "ts", ts(export))]
4307#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4309#[cfg_attr(feature = "serde", serde(tag = "type"))]
4310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4311#[repr(u32)]
4312#[doc = "SERIAL_CONTROL device types"]
4313pub enum SerialControlDev {
4314    #[doc = "First telemetry port"]
4315    SERIAL_CONTROL_DEV_TELEM1 = 0,
4316    #[doc = "Second telemetry port"]
4317    SERIAL_CONTROL_DEV_TELEM2 = 1,
4318    #[doc = "First GPS port"]
4319    SERIAL_CONTROL_DEV_GPS1 = 2,
4320    #[doc = "Second GPS port"]
4321    SERIAL_CONTROL_DEV_GPS2 = 3,
4322    #[doc = "system shell"]
4323    SERIAL_CONTROL_DEV_SHELL = 10,
4324    #[doc = "SERIAL0"]
4325    SERIAL_CONTROL_SERIAL0 = 100,
4326    #[doc = "SERIAL1"]
4327    SERIAL_CONTROL_SERIAL1 = 101,
4328    #[doc = "SERIAL2"]
4329    SERIAL_CONTROL_SERIAL2 = 102,
4330    #[doc = "SERIAL3"]
4331    SERIAL_CONTROL_SERIAL3 = 103,
4332    #[doc = "SERIAL4"]
4333    SERIAL_CONTROL_SERIAL4 = 104,
4334    #[doc = "SERIAL5"]
4335    SERIAL_CONTROL_SERIAL5 = 105,
4336    #[doc = "SERIAL6"]
4337    SERIAL_CONTROL_SERIAL6 = 106,
4338    #[doc = "SERIAL7"]
4339    SERIAL_CONTROL_SERIAL7 = 107,
4340    #[doc = "SERIAL8"]
4341    SERIAL_CONTROL_SERIAL8 = 108,
4342    #[doc = "SERIAL9"]
4343    SERIAL_CONTROL_SERIAL9 = 109,
4344}
4345impl SerialControlDev {
4346    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4347}
4348impl Default for SerialControlDev {
4349    fn default() -> Self {
4350        Self::DEFAULT
4351    }
4352}
4353bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4354impl SerialControlFlag {
4355    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4356}
4357impl Default for SerialControlFlag {
4358    fn default() -> Self {
4359        Self::DEFAULT
4360    }
4361}
4362#[cfg_attr(feature = "ts", derive(TS))]
4363#[cfg_attr(feature = "ts", ts(export))]
4364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4366#[cfg_attr(feature = "serde", serde(tag = "type"))]
4367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4368#[repr(u32)]
4369#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4370pub enum SetFocusType {
4371    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4372    FOCUS_TYPE_STEP = 0,
4373    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4374    FOCUS_TYPE_CONTINUOUS = 1,
4375    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4376    FOCUS_TYPE_RANGE = 2,
4377    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4378    FOCUS_TYPE_METERS = 3,
4379    #[doc = "Focus automatically."]
4380    FOCUS_TYPE_AUTO = 4,
4381    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4382    FOCUS_TYPE_AUTO_SINGLE = 5,
4383    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4384    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4385}
4386impl SetFocusType {
4387    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4388}
4389impl Default for SetFocusType {
4390    fn default() -> Self {
4391        Self::DEFAULT
4392    }
4393}
4394#[cfg_attr(feature = "ts", derive(TS))]
4395#[cfg_attr(feature = "ts", ts(export))]
4396#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4398#[cfg_attr(feature = "serde", serde(tag = "type"))]
4399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4400#[repr(u32)]
4401#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4402pub enum SpeedType {
4403    #[doc = "Airspeed"]
4404    SPEED_TYPE_AIRSPEED = 0,
4405    #[doc = "Groundspeed"]
4406    SPEED_TYPE_GROUNDSPEED = 1,
4407    #[doc = "Climb speed"]
4408    SPEED_TYPE_CLIMB_SPEED = 2,
4409    #[doc = "Descent speed"]
4410    SPEED_TYPE_DESCENT_SPEED = 3,
4411}
4412impl SpeedType {
4413    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4414}
4415impl Default for SpeedType {
4416    fn default() -> Self {
4417        Self::DEFAULT
4418    }
4419}
4420#[cfg_attr(feature = "ts", derive(TS))]
4421#[cfg_attr(feature = "ts", ts(export))]
4422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4424#[cfg_attr(feature = "serde", serde(tag = "type"))]
4425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4426#[repr(u32)]
4427#[doc = "Flags to indicate the status of camera storage."]
4428pub enum StorageStatus {
4429    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4430    STORAGE_STATUS_EMPTY = 0,
4431    #[doc = "Storage present but unformatted."]
4432    STORAGE_STATUS_UNFORMATTED = 1,
4433    #[doc = "Storage present and ready."]
4434    STORAGE_STATUS_READY = 2,
4435    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4436    STORAGE_STATUS_NOT_SUPPORTED = 3,
4437}
4438impl StorageStatus {
4439    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4440}
4441impl Default for StorageStatus {
4442    fn default() -> Self {
4443        Self::DEFAULT
4444    }
4445}
4446#[cfg_attr(feature = "ts", derive(TS))]
4447#[cfg_attr(feature = "ts", ts(export))]
4448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4450#[cfg_attr(feature = "serde", serde(tag = "type"))]
4451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4452#[repr(u32)]
4453#[doc = "Flags to indicate the type of storage."]
4454pub enum StorageType {
4455    #[doc = "Storage type is not known."]
4456    STORAGE_TYPE_UNKNOWN = 0,
4457    #[doc = "Storage type is USB device."]
4458    STORAGE_TYPE_USB_STICK = 1,
4459    #[doc = "Storage type is SD card."]
4460    STORAGE_TYPE_SD = 2,
4461    #[doc = "Storage type is microSD card."]
4462    STORAGE_TYPE_MICROSD = 3,
4463    #[doc = "Storage type is CFast."]
4464    STORAGE_TYPE_CF = 4,
4465    #[doc = "Storage type is CFexpress."]
4466    STORAGE_TYPE_CFE = 5,
4467    #[doc = "Storage type is XQD."]
4468    STORAGE_TYPE_XQD = 6,
4469    #[doc = "Storage type is HD mass storage type."]
4470    STORAGE_TYPE_HD = 7,
4471    #[doc = "Storage type is other, not listed type."]
4472    STORAGE_TYPE_OTHER = 254,
4473}
4474impl StorageType {
4475    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4476}
4477impl Default for StorageType {
4478    fn default() -> Self {
4479        Self::DEFAULT
4480    }
4481}
4482bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4483impl StorageUsageFlag {
4484    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4485}
4486impl Default for StorageUsageFlag {
4487    fn default() -> Self {
4488        Self::DEFAULT
4489    }
4490}
4491#[cfg_attr(feature = "ts", derive(TS))]
4492#[cfg_attr(feature = "ts", ts(export))]
4493#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4495#[cfg_attr(feature = "serde", serde(tag = "type"))]
4496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4497#[repr(u32)]
4498#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4499pub enum TuneFormat {
4500    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4501    TUNE_FORMAT_QBASIC1_1 = 1,
4502    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4503    TUNE_FORMAT_MML_MODERN = 2,
4504}
4505impl TuneFormat {
4506    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4507}
4508impl Default for TuneFormat {
4509    fn default() -> Self {
4510        Self::DEFAULT
4511    }
4512}
4513#[cfg_attr(feature = "ts", derive(TS))]
4514#[cfg_attr(feature = "ts", ts(export))]
4515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4517#[cfg_attr(feature = "serde", serde(tag = "type"))]
4518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4519#[repr(u32)]
4520#[doc = "Generalized UAVCAN node health"]
4521pub enum UavcanNodeHealth {
4522    #[doc = "The node is functioning properly."]
4523    UAVCAN_NODE_HEALTH_OK = 0,
4524    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4525    UAVCAN_NODE_HEALTH_WARNING = 1,
4526    #[doc = "The node has encountered a major failure."]
4527    UAVCAN_NODE_HEALTH_ERROR = 2,
4528    #[doc = "The node has suffered a fatal malfunction."]
4529    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4530}
4531impl UavcanNodeHealth {
4532    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4533}
4534impl Default for UavcanNodeHealth {
4535    fn default() -> Self {
4536        Self::DEFAULT
4537    }
4538}
4539#[cfg_attr(feature = "ts", derive(TS))]
4540#[cfg_attr(feature = "ts", ts(export))]
4541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4543#[cfg_attr(feature = "serde", serde(tag = "type"))]
4544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4545#[repr(u32)]
4546#[doc = "Generalized UAVCAN node mode"]
4547pub enum UavcanNodeMode {
4548    #[doc = "The node is performing its primary functions."]
4549    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4550    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4551    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4552    #[doc = "The node is under maintenance."]
4553    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4554    #[doc = "The node is in the process of updating its software."]
4555    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4556    #[doc = "The node is no longer available online."]
4557    UAVCAN_NODE_MODE_OFFLINE = 7,
4558}
4559impl UavcanNodeMode {
4560    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4561}
4562impl Default for UavcanNodeMode {
4563    fn default() -> Self {
4564        Self::DEFAULT
4565    }
4566}
4567bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4568impl UtmDataAvailFlags {
4569    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4570}
4571impl Default for UtmDataAvailFlags {
4572    fn default() -> Self {
4573        Self::DEFAULT
4574    }
4575}
4576#[cfg_attr(feature = "ts", derive(TS))]
4577#[cfg_attr(feature = "ts", ts(export))]
4578#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4580#[cfg_attr(feature = "serde", serde(tag = "type"))]
4581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4582#[repr(u32)]
4583#[doc = "Airborne status of UAS."]
4584pub enum UtmFlightState {
4585    #[doc = "The flight state can't be determined."]
4586    UTM_FLIGHT_STATE_UNKNOWN = 1,
4587    #[doc = "UAS on ground."]
4588    UTM_FLIGHT_STATE_GROUND = 2,
4589    #[doc = "UAS airborne."]
4590    UTM_FLIGHT_STATE_AIRBORNE = 3,
4591    #[doc = "UAS is in an emergency flight state."]
4592    UTM_FLIGHT_STATE_EMERGENCY = 16,
4593    #[doc = "UAS has no active controls."]
4594    UTM_FLIGHT_STATE_NOCTRL = 32,
4595}
4596impl UtmFlightState {
4597    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4598}
4599impl Default for UtmFlightState {
4600    fn default() -> Self {
4601        Self::DEFAULT
4602    }
4603}
4604#[cfg_attr(feature = "ts", derive(TS))]
4605#[cfg_attr(feature = "ts", ts(export))]
4606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4608#[cfg_attr(feature = "serde", serde(tag = "type"))]
4609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4610#[repr(u32)]
4611#[doc = "Video stream encodings"]
4612pub enum VideoStreamEncoding {
4613    #[doc = "Stream encoding is unknown"]
4614    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4615    #[doc = "Stream encoding is H.264"]
4616    VIDEO_STREAM_ENCODING_H264 = 1,
4617    #[doc = "Stream encoding is H.265"]
4618    VIDEO_STREAM_ENCODING_H265 = 2,
4619}
4620impl VideoStreamEncoding {
4621    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4622}
4623impl Default for VideoStreamEncoding {
4624    fn default() -> Self {
4625        Self::DEFAULT
4626    }
4627}
4628bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4629impl VideoStreamStatusFlags {
4630    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4631}
4632impl Default for VideoStreamStatusFlags {
4633    fn default() -> Self {
4634        Self::DEFAULT
4635    }
4636}
4637#[cfg_attr(feature = "ts", derive(TS))]
4638#[cfg_attr(feature = "ts", ts(export))]
4639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4641#[cfg_attr(feature = "serde", serde(tag = "type"))]
4642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4643#[repr(u32)]
4644#[doc = "Video stream types"]
4645pub enum VideoStreamType {
4646    #[doc = "Stream is RTSP"]
4647    VIDEO_STREAM_TYPE_RTSP = 0,
4648    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4649    VIDEO_STREAM_TYPE_RTPUDP = 1,
4650    #[doc = "Stream is MPEG on TCP"]
4651    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4652    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4653    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4654}
4655impl VideoStreamType {
4656    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4657}
4658impl Default for VideoStreamType {
4659    fn default() -> Self {
4660        Self::DEFAULT
4661    }
4662}
4663#[cfg_attr(feature = "ts", derive(TS))]
4664#[cfg_attr(feature = "ts", ts(export))]
4665#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4667#[cfg_attr(feature = "serde", serde(tag = "type"))]
4668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4669#[repr(u32)]
4670#[doc = "Direction of VTOL transition"]
4671pub enum VtolTransitionHeading {
4672    #[doc = "Respect the heading configuration of the vehicle."]
4673    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4674    #[doc = "Use the heading pointing towards the next waypoint."]
4675    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4676    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4677    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4678    #[doc = "Use the specified heading in parameter 4."]
4679    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4680    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4681    VTOL_TRANSITION_HEADING_ANY = 4,
4682}
4683impl VtolTransitionHeading {
4684    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4685}
4686impl Default for VtolTransitionHeading {
4687    fn default() -> Self {
4688        Self::DEFAULT
4689    }
4690}
4691#[cfg_attr(feature = "ts", derive(TS))]
4692#[cfg_attr(feature = "ts", ts(export))]
4693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4695#[cfg_attr(feature = "serde", serde(tag = "type"))]
4696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4697#[repr(u32)]
4698#[doc = "WiFi Mode."]
4699pub enum WifiConfigApMode {
4700    #[doc = "WiFi mode is undefined."]
4701    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4702    #[doc = "WiFi configured as an access point."]
4703    WIFI_CONFIG_AP_MODE_AP = 1,
4704    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4705    WIFI_CONFIG_AP_MODE_STATION = 2,
4706    #[doc = "WiFi disabled."]
4707    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4708}
4709impl WifiConfigApMode {
4710    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4711}
4712impl Default for WifiConfigApMode {
4713    fn default() -> Self {
4714        Self::DEFAULT
4715    }
4716}
4717#[cfg_attr(feature = "ts", derive(TS))]
4718#[cfg_attr(feature = "ts", ts(export))]
4719#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4721#[cfg_attr(feature = "serde", serde(tag = "type"))]
4722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4723#[repr(u32)]
4724#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4725pub enum WifiConfigApResponse {
4726    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4727    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4728    #[doc = "Changes accepted."]
4729    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4730    #[doc = "Changes rejected."]
4731    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4732    #[doc = "Invalid Mode."]
4733    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4734    #[doc = "Invalid SSID."]
4735    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4736    #[doc = "Invalid Password."]
4737    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4738}
4739impl WifiConfigApResponse {
4740    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4741}
4742impl Default for WifiConfigApResponse {
4743    fn default() -> Self {
4744        Self::DEFAULT
4745    }
4746}
4747#[cfg_attr(feature = "ts", derive(TS))]
4748#[cfg_attr(feature = "ts", ts(export))]
4749#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4751#[cfg_attr(feature = "serde", serde(tag = "type"))]
4752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4753#[repr(u32)]
4754#[doc = "Winch actions."]
4755pub enum WinchActions {
4756    #[doc = "Allow motor to freewheel."]
4757    WINCH_RELAXED = 0,
4758    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4759    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4760    #[doc = "Wind or unwind line at specified rate."]
4761    WINCH_RATE_CONTROL = 2,
4762    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4763    WINCH_LOCK = 3,
4764    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4765    WINCH_DELIVER = 4,
4766    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4767    WINCH_HOLD = 5,
4768    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4769    WINCH_RETRACT = 6,
4770    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4771    WINCH_LOAD_LINE = 7,
4772    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4773    WINCH_ABANDON_LINE = 8,
4774    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4775    WINCH_LOAD_PAYLOAD = 9,
4776}
4777impl WinchActions {
4778    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4779}
4780impl Default for WinchActions {
4781    fn default() -> Self {
4782        Self::DEFAULT
4783    }
4784}
4785#[doc = "Set the vehicle attitude and body angular rates."]
4786#[doc = ""]
4787#[doc = "ID: 140"]
4788#[derive(Debug, Clone, PartialEq)]
4789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4790#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4791#[cfg_attr(feature = "ts", derive(TS))]
4792#[cfg_attr(feature = "ts", ts(export))]
4793pub struct ACTUATOR_CONTROL_TARGET_DATA {
4794    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4795    pub time_usec: u64,
4796    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4799    pub controls: [f32; 8],
4800    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4801    pub group_mlx: u8,
4802}
4803impl ACTUATOR_CONTROL_TARGET_DATA {
4804    pub const ENCODED_LEN: usize = 41usize;
4805    pub const DEFAULT: Self = Self {
4806        time_usec: 0_u64,
4807        controls: [0.0_f32; 8usize],
4808        group_mlx: 0_u8,
4809    };
4810    #[cfg(feature = "arbitrary")]
4811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4812        use arbitrary::{Arbitrary, Unstructured};
4813        let mut buf = [0u8; 1024];
4814        rng.fill_bytes(&mut buf);
4815        let mut unstructured = Unstructured::new(&buf);
4816        Self::arbitrary(&mut unstructured).unwrap_or_default()
4817    }
4818}
4819impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4820    fn default() -> Self {
4821        Self::DEFAULT.clone()
4822    }
4823}
4824impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4825    type Message = MavMessage;
4826    const ID: u32 = 140u32;
4827    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4828    const EXTRA_CRC: u8 = 181u8;
4829    const ENCODED_LEN: usize = 41usize;
4830    fn deser(
4831        _version: MavlinkVersion,
4832        __input: &[u8],
4833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4834        let avail_len = __input.len();
4835        let mut payload_buf = [0; Self::ENCODED_LEN];
4836        let mut buf = if avail_len < Self::ENCODED_LEN {
4837            payload_buf[0..avail_len].copy_from_slice(__input);
4838            Bytes::new(&payload_buf)
4839        } else {
4840            Bytes::new(__input)
4841        };
4842        let mut __struct = Self::default();
4843        __struct.time_usec = buf.get_u64_le();
4844        for v in &mut __struct.controls {
4845            let val = buf.get_f32_le();
4846            *v = val;
4847        }
4848        __struct.group_mlx = buf.get_u8();
4849        Ok(__struct)
4850    }
4851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4852        let mut __tmp = BytesMut::new(bytes);
4853        #[allow(clippy::absurd_extreme_comparisons)]
4854        #[allow(unused_comparisons)]
4855        if __tmp.remaining() < Self::ENCODED_LEN {
4856            panic!(
4857                "buffer is too small (need {} bytes, but got {})",
4858                Self::ENCODED_LEN,
4859                __tmp.remaining(),
4860            )
4861        }
4862        __tmp.put_u64_le(self.time_usec);
4863        for val in &self.controls {
4864            __tmp.put_f32_le(*val);
4865        }
4866        __tmp.put_u8(self.group_mlx);
4867        if matches!(version, MavlinkVersion::V2) {
4868            let len = __tmp.len();
4869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4870        } else {
4871            __tmp.len()
4872        }
4873    }
4874}
4875#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4876#[doc = ""]
4877#[doc = "ID: 375"]
4878#[derive(Debug, Clone, PartialEq)]
4879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4881#[cfg_attr(feature = "ts", derive(TS))]
4882#[cfg_attr(feature = "ts", ts(export))]
4883pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4884    #[doc = "Timestamp (since system boot)."]
4885    pub time_usec: u64,
4886    #[doc = "Active outputs"]
4887    pub active: u32,
4888    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4889    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4890    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4891    pub actuator: [f32; 32],
4892}
4893impl ACTUATOR_OUTPUT_STATUS_DATA {
4894    pub const ENCODED_LEN: usize = 140usize;
4895    pub const DEFAULT: Self = Self {
4896        time_usec: 0_u64,
4897        active: 0_u32,
4898        actuator: [0.0_f32; 32usize],
4899    };
4900    #[cfg(feature = "arbitrary")]
4901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4902        use arbitrary::{Arbitrary, Unstructured};
4903        let mut buf = [0u8; 1024];
4904        rng.fill_bytes(&mut buf);
4905        let mut unstructured = Unstructured::new(&buf);
4906        Self::arbitrary(&mut unstructured).unwrap_or_default()
4907    }
4908}
4909impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4910    fn default() -> Self {
4911        Self::DEFAULT.clone()
4912    }
4913}
4914impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4915    type Message = MavMessage;
4916    const ID: u32 = 375u32;
4917    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4918    const EXTRA_CRC: u8 = 251u8;
4919    const ENCODED_LEN: usize = 140usize;
4920    fn deser(
4921        _version: MavlinkVersion,
4922        __input: &[u8],
4923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4924        let avail_len = __input.len();
4925        let mut payload_buf = [0; Self::ENCODED_LEN];
4926        let mut buf = if avail_len < Self::ENCODED_LEN {
4927            payload_buf[0..avail_len].copy_from_slice(__input);
4928            Bytes::new(&payload_buf)
4929        } else {
4930            Bytes::new(__input)
4931        };
4932        let mut __struct = Self::default();
4933        __struct.time_usec = buf.get_u64_le();
4934        __struct.active = buf.get_u32_le();
4935        for v in &mut __struct.actuator {
4936            let val = buf.get_f32_le();
4937            *v = val;
4938        }
4939        Ok(__struct)
4940    }
4941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4942        let mut __tmp = BytesMut::new(bytes);
4943        #[allow(clippy::absurd_extreme_comparisons)]
4944        #[allow(unused_comparisons)]
4945        if __tmp.remaining() < Self::ENCODED_LEN {
4946            panic!(
4947                "buffer is too small (need {} bytes, but got {})",
4948                Self::ENCODED_LEN,
4949                __tmp.remaining(),
4950            )
4951        }
4952        __tmp.put_u64_le(self.time_usec);
4953        __tmp.put_u32_le(self.active);
4954        for val in &self.actuator {
4955            __tmp.put_f32_le(*val);
4956        }
4957        if matches!(version, MavlinkVersion::V2) {
4958            let len = __tmp.len();
4959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4960        } else {
4961            __tmp.len()
4962        }
4963    }
4964}
4965#[doc = "The location and information of an ADSB vehicle."]
4966#[doc = ""]
4967#[doc = "ID: 246"]
4968#[derive(Debug, Clone, PartialEq)]
4969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4971#[cfg_attr(feature = "ts", derive(TS))]
4972#[cfg_attr(feature = "ts", ts(export))]
4973pub struct ADSB_VEHICLE_DATA {
4974    #[doc = "ICAO address"]
4975    pub ICAO_address: u32,
4976    #[doc = "Latitude"]
4977    pub lat: i32,
4978    #[doc = "Longitude"]
4979    pub lon: i32,
4980    #[doc = "Altitude(ASL)"]
4981    pub altitude: i32,
4982    #[doc = "Course over ground"]
4983    pub heading: u16,
4984    #[doc = "The horizontal velocity"]
4985    pub hor_velocity: u16,
4986    #[doc = "The vertical velocity. Positive is up"]
4987    pub ver_velocity: i16,
4988    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4989    pub flags: AdsbFlags,
4990    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4991    pub squawk: u16,
4992    #[doc = "ADSB altitude type."]
4993    pub altitude_type: AdsbAltitudeType,
4994    #[doc = "The callsign, 8+null"]
4995    #[cfg_attr(feature = "ts", ts(type = "string"))]
4996    pub callsign: CharArray<9>,
4997    #[doc = "ADSB emitter type."]
4998    pub emitter_type: AdsbEmitterType,
4999    #[doc = "Time since last communication in seconds"]
5000    pub tslc: u8,
5001}
5002impl ADSB_VEHICLE_DATA {
5003    pub const ENCODED_LEN: usize = 38usize;
5004    pub const DEFAULT: Self = Self {
5005        ICAO_address: 0_u32,
5006        lat: 0_i32,
5007        lon: 0_i32,
5008        altitude: 0_i32,
5009        heading: 0_u16,
5010        hor_velocity: 0_u16,
5011        ver_velocity: 0_i16,
5012        flags: AdsbFlags::DEFAULT,
5013        squawk: 0_u16,
5014        altitude_type: AdsbAltitudeType::DEFAULT,
5015        callsign: CharArray::new([0_u8; 9usize]),
5016        emitter_type: AdsbEmitterType::DEFAULT,
5017        tslc: 0_u8,
5018    };
5019    #[cfg(feature = "arbitrary")]
5020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5021        use arbitrary::{Arbitrary, Unstructured};
5022        let mut buf = [0u8; 1024];
5023        rng.fill_bytes(&mut buf);
5024        let mut unstructured = Unstructured::new(&buf);
5025        Self::arbitrary(&mut unstructured).unwrap_or_default()
5026    }
5027}
5028impl Default for ADSB_VEHICLE_DATA {
5029    fn default() -> Self {
5030        Self::DEFAULT.clone()
5031    }
5032}
5033impl MessageData for ADSB_VEHICLE_DATA {
5034    type Message = MavMessage;
5035    const ID: u32 = 246u32;
5036    const NAME: &'static str = "ADSB_VEHICLE";
5037    const EXTRA_CRC: u8 = 184u8;
5038    const ENCODED_LEN: usize = 38usize;
5039    fn deser(
5040        _version: MavlinkVersion,
5041        __input: &[u8],
5042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5043        let avail_len = __input.len();
5044        let mut payload_buf = [0; Self::ENCODED_LEN];
5045        let mut buf = if avail_len < Self::ENCODED_LEN {
5046            payload_buf[0..avail_len].copy_from_slice(__input);
5047            Bytes::new(&payload_buf)
5048        } else {
5049            Bytes::new(__input)
5050        };
5051        let mut __struct = Self::default();
5052        __struct.ICAO_address = buf.get_u32_le();
5053        __struct.lat = buf.get_i32_le();
5054        __struct.lon = buf.get_i32_le();
5055        __struct.altitude = buf.get_i32_le();
5056        __struct.heading = buf.get_u16_le();
5057        __struct.hor_velocity = buf.get_u16_le();
5058        __struct.ver_velocity = buf.get_i16_le();
5059        let tmp = buf.get_u16_le();
5060        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5061            ::mavlink_core::error::ParserError::InvalidFlag {
5062                flag_type: "AdsbFlags",
5063                value: tmp as u32,
5064            },
5065        )?;
5066        __struct.squawk = buf.get_u16_le();
5067        let tmp = buf.get_u8();
5068        __struct.altitude_type =
5069            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5070                enum_type: "AdsbAltitudeType",
5071                value: tmp as u32,
5072            })?;
5073        let mut tmp = [0_u8; 9usize];
5074        for v in &mut tmp {
5075            *v = buf.get_u8();
5076        }
5077        __struct.callsign = CharArray::new(tmp);
5078        let tmp = buf.get_u8();
5079        __struct.emitter_type =
5080            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5081                enum_type: "AdsbEmitterType",
5082                value: tmp as u32,
5083            })?;
5084        __struct.tslc = buf.get_u8();
5085        Ok(__struct)
5086    }
5087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5088        let mut __tmp = BytesMut::new(bytes);
5089        #[allow(clippy::absurd_extreme_comparisons)]
5090        #[allow(unused_comparisons)]
5091        if __tmp.remaining() < Self::ENCODED_LEN {
5092            panic!(
5093                "buffer is too small (need {} bytes, but got {})",
5094                Self::ENCODED_LEN,
5095                __tmp.remaining(),
5096            )
5097        }
5098        __tmp.put_u32_le(self.ICAO_address);
5099        __tmp.put_i32_le(self.lat);
5100        __tmp.put_i32_le(self.lon);
5101        __tmp.put_i32_le(self.altitude);
5102        __tmp.put_u16_le(self.heading);
5103        __tmp.put_u16_le(self.hor_velocity);
5104        __tmp.put_i16_le(self.ver_velocity);
5105        __tmp.put_u16_le(self.flags.bits());
5106        __tmp.put_u16_le(self.squawk);
5107        __tmp.put_u8(self.altitude_type as u8);
5108        for val in &self.callsign {
5109            __tmp.put_u8(*val);
5110        }
5111        __tmp.put_u8(self.emitter_type as u8);
5112        __tmp.put_u8(self.tslc);
5113        if matches!(version, MavlinkVersion::V2) {
5114            let len = __tmp.len();
5115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5116        } else {
5117            __tmp.len()
5118        }
5119    }
5120}
5121#[doc = "The location and information of an AIS vessel."]
5122#[doc = ""]
5123#[doc = "ID: 301"]
5124#[derive(Debug, Clone, PartialEq)]
5125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5127#[cfg_attr(feature = "ts", derive(TS))]
5128#[cfg_attr(feature = "ts", ts(export))]
5129pub struct AIS_VESSEL_DATA {
5130    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5131    pub MMSI: u32,
5132    #[doc = "Latitude"]
5133    pub lat: i32,
5134    #[doc = "Longitude"]
5135    pub lon: i32,
5136    #[doc = "Course over ground"]
5137    pub COG: u16,
5138    #[doc = "True heading"]
5139    pub heading: u16,
5140    #[doc = "Speed over ground"]
5141    pub velocity: u16,
5142    #[doc = "Distance from lat/lon location to bow"]
5143    pub dimension_bow: u16,
5144    #[doc = "Distance from lat/lon location to stern"]
5145    pub dimension_stern: u16,
5146    #[doc = "Time since last communication in seconds"]
5147    pub tslc: u16,
5148    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5149    pub flags: AisFlags,
5150    #[doc = "Turn rate"]
5151    pub turn_rate: i8,
5152    #[doc = "Navigational status"]
5153    pub navigational_status: AisNavStatus,
5154    #[doc = "Type of vessels"]
5155    pub mavtype: AisType,
5156    #[doc = "Distance from lat/lon location to port side"]
5157    pub dimension_port: u8,
5158    #[doc = "Distance from lat/lon location to starboard side"]
5159    pub dimension_starboard: u8,
5160    #[doc = "The vessel callsign"]
5161    #[cfg_attr(feature = "ts", ts(type = "string"))]
5162    pub callsign: CharArray<7>,
5163    #[doc = "The vessel name"]
5164    #[cfg_attr(feature = "ts", ts(type = "string"))]
5165    pub name: CharArray<20>,
5166}
5167impl AIS_VESSEL_DATA {
5168    pub const ENCODED_LEN: usize = 58usize;
5169    pub const DEFAULT: Self = Self {
5170        MMSI: 0_u32,
5171        lat: 0_i32,
5172        lon: 0_i32,
5173        COG: 0_u16,
5174        heading: 0_u16,
5175        velocity: 0_u16,
5176        dimension_bow: 0_u16,
5177        dimension_stern: 0_u16,
5178        tslc: 0_u16,
5179        flags: AisFlags::DEFAULT,
5180        turn_rate: 0_i8,
5181        navigational_status: AisNavStatus::DEFAULT,
5182        mavtype: AisType::DEFAULT,
5183        dimension_port: 0_u8,
5184        dimension_starboard: 0_u8,
5185        callsign: CharArray::new([0_u8; 7usize]),
5186        name: CharArray::new([0_u8; 20usize]),
5187    };
5188    #[cfg(feature = "arbitrary")]
5189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5190        use arbitrary::{Arbitrary, Unstructured};
5191        let mut buf = [0u8; 1024];
5192        rng.fill_bytes(&mut buf);
5193        let mut unstructured = Unstructured::new(&buf);
5194        Self::arbitrary(&mut unstructured).unwrap_or_default()
5195    }
5196}
5197impl Default for AIS_VESSEL_DATA {
5198    fn default() -> Self {
5199        Self::DEFAULT.clone()
5200    }
5201}
5202impl MessageData for AIS_VESSEL_DATA {
5203    type Message = MavMessage;
5204    const ID: u32 = 301u32;
5205    const NAME: &'static str = "AIS_VESSEL";
5206    const EXTRA_CRC: u8 = 243u8;
5207    const ENCODED_LEN: usize = 58usize;
5208    fn deser(
5209        _version: MavlinkVersion,
5210        __input: &[u8],
5211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5212        let avail_len = __input.len();
5213        let mut payload_buf = [0; Self::ENCODED_LEN];
5214        let mut buf = if avail_len < Self::ENCODED_LEN {
5215            payload_buf[0..avail_len].copy_from_slice(__input);
5216            Bytes::new(&payload_buf)
5217        } else {
5218            Bytes::new(__input)
5219        };
5220        let mut __struct = Self::default();
5221        __struct.MMSI = buf.get_u32_le();
5222        __struct.lat = buf.get_i32_le();
5223        __struct.lon = buf.get_i32_le();
5224        __struct.COG = buf.get_u16_le();
5225        __struct.heading = buf.get_u16_le();
5226        __struct.velocity = buf.get_u16_le();
5227        __struct.dimension_bow = buf.get_u16_le();
5228        __struct.dimension_stern = buf.get_u16_le();
5229        __struct.tslc = buf.get_u16_le();
5230        let tmp = buf.get_u16_le();
5231        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5232            ::mavlink_core::error::ParserError::InvalidFlag {
5233                flag_type: "AisFlags",
5234                value: tmp as u32,
5235            },
5236        )?;
5237        __struct.turn_rate = buf.get_i8();
5238        let tmp = buf.get_u8();
5239        __struct.navigational_status =
5240            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5241                enum_type: "AisNavStatus",
5242                value: tmp as u32,
5243            })?;
5244        let tmp = buf.get_u8();
5245        __struct.mavtype =
5246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5247                enum_type: "AisType",
5248                value: tmp as u32,
5249            })?;
5250        __struct.dimension_port = buf.get_u8();
5251        __struct.dimension_starboard = buf.get_u8();
5252        let mut tmp = [0_u8; 7usize];
5253        for v in &mut tmp {
5254            *v = buf.get_u8();
5255        }
5256        __struct.callsign = CharArray::new(tmp);
5257        let mut tmp = [0_u8; 20usize];
5258        for v in &mut tmp {
5259            *v = buf.get_u8();
5260        }
5261        __struct.name = CharArray::new(tmp);
5262        Ok(__struct)
5263    }
5264    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5265        let mut __tmp = BytesMut::new(bytes);
5266        #[allow(clippy::absurd_extreme_comparisons)]
5267        #[allow(unused_comparisons)]
5268        if __tmp.remaining() < Self::ENCODED_LEN {
5269            panic!(
5270                "buffer is too small (need {} bytes, but got {})",
5271                Self::ENCODED_LEN,
5272                __tmp.remaining(),
5273            )
5274        }
5275        __tmp.put_u32_le(self.MMSI);
5276        __tmp.put_i32_le(self.lat);
5277        __tmp.put_i32_le(self.lon);
5278        __tmp.put_u16_le(self.COG);
5279        __tmp.put_u16_le(self.heading);
5280        __tmp.put_u16_le(self.velocity);
5281        __tmp.put_u16_le(self.dimension_bow);
5282        __tmp.put_u16_le(self.dimension_stern);
5283        __tmp.put_u16_le(self.tslc);
5284        __tmp.put_u16_le(self.flags.bits());
5285        __tmp.put_i8(self.turn_rate);
5286        __tmp.put_u8(self.navigational_status as u8);
5287        __tmp.put_u8(self.mavtype as u8);
5288        __tmp.put_u8(self.dimension_port);
5289        __tmp.put_u8(self.dimension_starboard);
5290        for val in &self.callsign {
5291            __tmp.put_u8(*val);
5292        }
5293        for val in &self.name {
5294            __tmp.put_u8(*val);
5295        }
5296        if matches!(version, MavlinkVersion::V2) {
5297            let len = __tmp.len();
5298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5299        } else {
5300            __tmp.len()
5301        }
5302    }
5303}
5304#[doc = "The current system altitude."]
5305#[doc = ""]
5306#[doc = "ID: 141"]
5307#[derive(Debug, Clone, PartialEq)]
5308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5310#[cfg_attr(feature = "ts", derive(TS))]
5311#[cfg_attr(feature = "ts", ts(export))]
5312pub struct ALTITUDE_DATA {
5313    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5314    pub time_usec: u64,
5315    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5316    pub altitude_monotonic: f32,
5317    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5318    pub altitude_amsl: f32,
5319    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5320    pub altitude_local: f32,
5321    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5322    pub altitude_relative: f32,
5323    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5324    pub altitude_terrain: f32,
5325    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5326    pub bottom_clearance: f32,
5327}
5328impl ALTITUDE_DATA {
5329    pub const ENCODED_LEN: usize = 32usize;
5330    pub const DEFAULT: Self = Self {
5331        time_usec: 0_u64,
5332        altitude_monotonic: 0.0_f32,
5333        altitude_amsl: 0.0_f32,
5334        altitude_local: 0.0_f32,
5335        altitude_relative: 0.0_f32,
5336        altitude_terrain: 0.0_f32,
5337        bottom_clearance: 0.0_f32,
5338    };
5339    #[cfg(feature = "arbitrary")]
5340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5341        use arbitrary::{Arbitrary, Unstructured};
5342        let mut buf = [0u8; 1024];
5343        rng.fill_bytes(&mut buf);
5344        let mut unstructured = Unstructured::new(&buf);
5345        Self::arbitrary(&mut unstructured).unwrap_or_default()
5346    }
5347}
5348impl Default for ALTITUDE_DATA {
5349    fn default() -> Self {
5350        Self::DEFAULT.clone()
5351    }
5352}
5353impl MessageData for ALTITUDE_DATA {
5354    type Message = MavMessage;
5355    const ID: u32 = 141u32;
5356    const NAME: &'static str = "ALTITUDE";
5357    const EXTRA_CRC: u8 = 47u8;
5358    const ENCODED_LEN: usize = 32usize;
5359    fn deser(
5360        _version: MavlinkVersion,
5361        __input: &[u8],
5362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5363        let avail_len = __input.len();
5364        let mut payload_buf = [0; Self::ENCODED_LEN];
5365        let mut buf = if avail_len < Self::ENCODED_LEN {
5366            payload_buf[0..avail_len].copy_from_slice(__input);
5367            Bytes::new(&payload_buf)
5368        } else {
5369            Bytes::new(__input)
5370        };
5371        let mut __struct = Self::default();
5372        __struct.time_usec = buf.get_u64_le();
5373        __struct.altitude_monotonic = buf.get_f32_le();
5374        __struct.altitude_amsl = buf.get_f32_le();
5375        __struct.altitude_local = buf.get_f32_le();
5376        __struct.altitude_relative = buf.get_f32_le();
5377        __struct.altitude_terrain = buf.get_f32_le();
5378        __struct.bottom_clearance = buf.get_f32_le();
5379        Ok(__struct)
5380    }
5381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5382        let mut __tmp = BytesMut::new(bytes);
5383        #[allow(clippy::absurd_extreme_comparisons)]
5384        #[allow(unused_comparisons)]
5385        if __tmp.remaining() < Self::ENCODED_LEN {
5386            panic!(
5387                "buffer is too small (need {} bytes, but got {})",
5388                Self::ENCODED_LEN,
5389                __tmp.remaining(),
5390            )
5391        }
5392        __tmp.put_u64_le(self.time_usec);
5393        __tmp.put_f32_le(self.altitude_monotonic);
5394        __tmp.put_f32_le(self.altitude_amsl);
5395        __tmp.put_f32_le(self.altitude_local);
5396        __tmp.put_f32_le(self.altitude_relative);
5397        __tmp.put_f32_le(self.altitude_terrain);
5398        __tmp.put_f32_le(self.bottom_clearance);
5399        if matches!(version, MavlinkVersion::V2) {
5400            let len = __tmp.len();
5401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5402        } else {
5403            __tmp.len()
5404        }
5405    }
5406}
5407#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5408#[doc = ""]
5409#[doc = "ID: 30"]
5410#[derive(Debug, Clone, PartialEq)]
5411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5413#[cfg_attr(feature = "ts", derive(TS))]
5414#[cfg_attr(feature = "ts", ts(export))]
5415pub struct ATTITUDE_DATA {
5416    #[doc = "Timestamp (time since system boot)."]
5417    pub time_boot_ms: u32,
5418    #[doc = "Roll angle (-pi..+pi)"]
5419    pub roll: f32,
5420    #[doc = "Pitch angle (-pi..+pi)"]
5421    pub pitch: f32,
5422    #[doc = "Yaw angle (-pi..+pi)"]
5423    pub yaw: f32,
5424    #[doc = "Roll angular speed"]
5425    pub rollspeed: f32,
5426    #[doc = "Pitch angular speed"]
5427    pub pitchspeed: f32,
5428    #[doc = "Yaw angular speed"]
5429    pub yawspeed: f32,
5430}
5431impl ATTITUDE_DATA {
5432    pub const ENCODED_LEN: usize = 28usize;
5433    pub const DEFAULT: Self = Self {
5434        time_boot_ms: 0_u32,
5435        roll: 0.0_f32,
5436        pitch: 0.0_f32,
5437        yaw: 0.0_f32,
5438        rollspeed: 0.0_f32,
5439        pitchspeed: 0.0_f32,
5440        yawspeed: 0.0_f32,
5441    };
5442    #[cfg(feature = "arbitrary")]
5443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5444        use arbitrary::{Arbitrary, Unstructured};
5445        let mut buf = [0u8; 1024];
5446        rng.fill_bytes(&mut buf);
5447        let mut unstructured = Unstructured::new(&buf);
5448        Self::arbitrary(&mut unstructured).unwrap_or_default()
5449    }
5450}
5451impl Default for ATTITUDE_DATA {
5452    fn default() -> Self {
5453        Self::DEFAULT.clone()
5454    }
5455}
5456impl MessageData for ATTITUDE_DATA {
5457    type Message = MavMessage;
5458    const ID: u32 = 30u32;
5459    const NAME: &'static str = "ATTITUDE";
5460    const EXTRA_CRC: u8 = 39u8;
5461    const ENCODED_LEN: usize = 28usize;
5462    fn deser(
5463        _version: MavlinkVersion,
5464        __input: &[u8],
5465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5466        let avail_len = __input.len();
5467        let mut payload_buf = [0; Self::ENCODED_LEN];
5468        let mut buf = if avail_len < Self::ENCODED_LEN {
5469            payload_buf[0..avail_len].copy_from_slice(__input);
5470            Bytes::new(&payload_buf)
5471        } else {
5472            Bytes::new(__input)
5473        };
5474        let mut __struct = Self::default();
5475        __struct.time_boot_ms = buf.get_u32_le();
5476        __struct.roll = buf.get_f32_le();
5477        __struct.pitch = buf.get_f32_le();
5478        __struct.yaw = buf.get_f32_le();
5479        __struct.rollspeed = buf.get_f32_le();
5480        __struct.pitchspeed = buf.get_f32_le();
5481        __struct.yawspeed = buf.get_f32_le();
5482        Ok(__struct)
5483    }
5484    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5485        let mut __tmp = BytesMut::new(bytes);
5486        #[allow(clippy::absurd_extreme_comparisons)]
5487        #[allow(unused_comparisons)]
5488        if __tmp.remaining() < Self::ENCODED_LEN {
5489            panic!(
5490                "buffer is too small (need {} bytes, but got {})",
5491                Self::ENCODED_LEN,
5492                __tmp.remaining(),
5493            )
5494        }
5495        __tmp.put_u32_le(self.time_boot_ms);
5496        __tmp.put_f32_le(self.roll);
5497        __tmp.put_f32_le(self.pitch);
5498        __tmp.put_f32_le(self.yaw);
5499        __tmp.put_f32_le(self.rollspeed);
5500        __tmp.put_f32_le(self.pitchspeed);
5501        __tmp.put_f32_le(self.yawspeed);
5502        if matches!(version, MavlinkVersion::V2) {
5503            let len = __tmp.len();
5504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5505        } else {
5506            __tmp.len()
5507        }
5508    }
5509}
5510#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5511#[doc = ""]
5512#[doc = "ID: 31"]
5513#[derive(Debug, Clone, PartialEq)]
5514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5516#[cfg_attr(feature = "ts", derive(TS))]
5517#[cfg_attr(feature = "ts", ts(export))]
5518pub struct ATTITUDE_QUATERNION_DATA {
5519    #[doc = "Timestamp (time since system boot)."]
5520    pub time_boot_ms: u32,
5521    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5522    pub q1: f32,
5523    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5524    pub q2: f32,
5525    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5526    pub q3: f32,
5527    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5528    pub q4: f32,
5529    #[doc = "Roll angular speed"]
5530    pub rollspeed: f32,
5531    #[doc = "Pitch angular speed"]
5532    pub pitchspeed: f32,
5533    #[doc = "Yaw angular speed"]
5534    pub yawspeed: f32,
5535    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5537    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5538    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5539    pub repr_offset_q: [f32; 4],
5540}
5541impl ATTITUDE_QUATERNION_DATA {
5542    pub const ENCODED_LEN: usize = 48usize;
5543    pub const DEFAULT: Self = Self {
5544        time_boot_ms: 0_u32,
5545        q1: 0.0_f32,
5546        q2: 0.0_f32,
5547        q3: 0.0_f32,
5548        q4: 0.0_f32,
5549        rollspeed: 0.0_f32,
5550        pitchspeed: 0.0_f32,
5551        yawspeed: 0.0_f32,
5552        repr_offset_q: [0.0_f32; 4usize],
5553    };
5554    #[cfg(feature = "arbitrary")]
5555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5556        use arbitrary::{Arbitrary, Unstructured};
5557        let mut buf = [0u8; 1024];
5558        rng.fill_bytes(&mut buf);
5559        let mut unstructured = Unstructured::new(&buf);
5560        Self::arbitrary(&mut unstructured).unwrap_or_default()
5561    }
5562}
5563impl Default for ATTITUDE_QUATERNION_DATA {
5564    fn default() -> Self {
5565        Self::DEFAULT.clone()
5566    }
5567}
5568impl MessageData for ATTITUDE_QUATERNION_DATA {
5569    type Message = MavMessage;
5570    const ID: u32 = 31u32;
5571    const NAME: &'static str = "ATTITUDE_QUATERNION";
5572    const EXTRA_CRC: u8 = 246u8;
5573    const ENCODED_LEN: usize = 48usize;
5574    fn deser(
5575        _version: MavlinkVersion,
5576        __input: &[u8],
5577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5578        let avail_len = __input.len();
5579        let mut payload_buf = [0; Self::ENCODED_LEN];
5580        let mut buf = if avail_len < Self::ENCODED_LEN {
5581            payload_buf[0..avail_len].copy_from_slice(__input);
5582            Bytes::new(&payload_buf)
5583        } else {
5584            Bytes::new(__input)
5585        };
5586        let mut __struct = Self::default();
5587        __struct.time_boot_ms = buf.get_u32_le();
5588        __struct.q1 = buf.get_f32_le();
5589        __struct.q2 = buf.get_f32_le();
5590        __struct.q3 = buf.get_f32_le();
5591        __struct.q4 = buf.get_f32_le();
5592        __struct.rollspeed = buf.get_f32_le();
5593        __struct.pitchspeed = buf.get_f32_le();
5594        __struct.yawspeed = buf.get_f32_le();
5595        for v in &mut __struct.repr_offset_q {
5596            let val = buf.get_f32_le();
5597            *v = val;
5598        }
5599        Ok(__struct)
5600    }
5601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5602        let mut __tmp = BytesMut::new(bytes);
5603        #[allow(clippy::absurd_extreme_comparisons)]
5604        #[allow(unused_comparisons)]
5605        if __tmp.remaining() < Self::ENCODED_LEN {
5606            panic!(
5607                "buffer is too small (need {} bytes, but got {})",
5608                Self::ENCODED_LEN,
5609                __tmp.remaining(),
5610            )
5611        }
5612        __tmp.put_u32_le(self.time_boot_ms);
5613        __tmp.put_f32_le(self.q1);
5614        __tmp.put_f32_le(self.q2);
5615        __tmp.put_f32_le(self.q3);
5616        __tmp.put_f32_le(self.q4);
5617        __tmp.put_f32_le(self.rollspeed);
5618        __tmp.put_f32_le(self.pitchspeed);
5619        __tmp.put_f32_le(self.yawspeed);
5620        if matches!(version, MavlinkVersion::V2) {
5621            for val in &self.repr_offset_q {
5622                __tmp.put_f32_le(*val);
5623            }
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5632#[doc = ""]
5633#[doc = "ID: 61"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_QUATERNION_COV_DATA {
5640    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5641    pub time_usec: u64,
5642    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5645    pub q: [f32; 4],
5646    #[doc = "Roll angular speed"]
5647    pub rollspeed: f32,
5648    #[doc = "Pitch angular speed"]
5649    pub pitchspeed: f32,
5650    #[doc = "Yaw angular speed"]
5651    pub yawspeed: f32,
5652    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5655    pub covariance: [f32; 9],
5656}
5657impl ATTITUDE_QUATERNION_COV_DATA {
5658    pub const ENCODED_LEN: usize = 72usize;
5659    pub const DEFAULT: Self = Self {
5660        time_usec: 0_u64,
5661        q: [0.0_f32; 4usize],
5662        rollspeed: 0.0_f32,
5663        pitchspeed: 0.0_f32,
5664        yawspeed: 0.0_f32,
5665        covariance: [0.0_f32; 9usize],
5666    };
5667    #[cfg(feature = "arbitrary")]
5668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5669        use arbitrary::{Arbitrary, Unstructured};
5670        let mut buf = [0u8; 1024];
5671        rng.fill_bytes(&mut buf);
5672        let mut unstructured = Unstructured::new(&buf);
5673        Self::arbitrary(&mut unstructured).unwrap_or_default()
5674    }
5675}
5676impl Default for ATTITUDE_QUATERNION_COV_DATA {
5677    fn default() -> Self {
5678        Self::DEFAULT.clone()
5679    }
5680}
5681impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5682    type Message = MavMessage;
5683    const ID: u32 = 61u32;
5684    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5685    const EXTRA_CRC: u8 = 167u8;
5686    const ENCODED_LEN: usize = 72usize;
5687    fn deser(
5688        _version: MavlinkVersion,
5689        __input: &[u8],
5690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5691        let avail_len = __input.len();
5692        let mut payload_buf = [0; Self::ENCODED_LEN];
5693        let mut buf = if avail_len < Self::ENCODED_LEN {
5694            payload_buf[0..avail_len].copy_from_slice(__input);
5695            Bytes::new(&payload_buf)
5696        } else {
5697            Bytes::new(__input)
5698        };
5699        let mut __struct = Self::default();
5700        __struct.time_usec = buf.get_u64_le();
5701        for v in &mut __struct.q {
5702            let val = buf.get_f32_le();
5703            *v = val;
5704        }
5705        __struct.rollspeed = buf.get_f32_le();
5706        __struct.pitchspeed = buf.get_f32_le();
5707        __struct.yawspeed = buf.get_f32_le();
5708        for v in &mut __struct.covariance {
5709            let val = buf.get_f32_le();
5710            *v = val;
5711        }
5712        Ok(__struct)
5713    }
5714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5715        let mut __tmp = BytesMut::new(bytes);
5716        #[allow(clippy::absurd_extreme_comparisons)]
5717        #[allow(unused_comparisons)]
5718        if __tmp.remaining() < Self::ENCODED_LEN {
5719            panic!(
5720                "buffer is too small (need {} bytes, but got {})",
5721                Self::ENCODED_LEN,
5722                __tmp.remaining(),
5723            )
5724        }
5725        __tmp.put_u64_le(self.time_usec);
5726        for val in &self.q {
5727            __tmp.put_f32_le(*val);
5728        }
5729        __tmp.put_f32_le(self.rollspeed);
5730        __tmp.put_f32_le(self.pitchspeed);
5731        __tmp.put_f32_le(self.yawspeed);
5732        for val in &self.covariance {
5733            __tmp.put_f32_le(*val);
5734        }
5735        if matches!(version, MavlinkVersion::V2) {
5736            let len = __tmp.len();
5737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5738        } else {
5739            __tmp.len()
5740        }
5741    }
5742}
5743#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5744#[doc = ""]
5745#[doc = "ID: 83"]
5746#[derive(Debug, Clone, PartialEq)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5749#[cfg_attr(feature = "ts", derive(TS))]
5750#[cfg_attr(feature = "ts", ts(export))]
5751pub struct ATTITUDE_TARGET_DATA {
5752    #[doc = "Timestamp (time since system boot)."]
5753    pub time_boot_ms: u32,
5754    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5755    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5756    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5757    pub q: [f32; 4],
5758    #[doc = "Body roll rate"]
5759    pub body_roll_rate: f32,
5760    #[doc = "Body pitch rate"]
5761    pub body_pitch_rate: f32,
5762    #[doc = "Body yaw rate"]
5763    pub body_yaw_rate: f32,
5764    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5765    pub thrust: f32,
5766    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5767    pub type_mask: AttitudeTargetTypemask,
5768}
5769impl ATTITUDE_TARGET_DATA {
5770    pub const ENCODED_LEN: usize = 37usize;
5771    pub const DEFAULT: Self = Self {
5772        time_boot_ms: 0_u32,
5773        q: [0.0_f32; 4usize],
5774        body_roll_rate: 0.0_f32,
5775        body_pitch_rate: 0.0_f32,
5776        body_yaw_rate: 0.0_f32,
5777        thrust: 0.0_f32,
5778        type_mask: AttitudeTargetTypemask::DEFAULT,
5779    };
5780    #[cfg(feature = "arbitrary")]
5781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5782        use arbitrary::{Arbitrary, Unstructured};
5783        let mut buf = [0u8; 1024];
5784        rng.fill_bytes(&mut buf);
5785        let mut unstructured = Unstructured::new(&buf);
5786        Self::arbitrary(&mut unstructured).unwrap_or_default()
5787    }
5788}
5789impl Default for ATTITUDE_TARGET_DATA {
5790    fn default() -> Self {
5791        Self::DEFAULT.clone()
5792    }
5793}
5794impl MessageData for ATTITUDE_TARGET_DATA {
5795    type Message = MavMessage;
5796    const ID: u32 = 83u32;
5797    const NAME: &'static str = "ATTITUDE_TARGET";
5798    const EXTRA_CRC: u8 = 22u8;
5799    const ENCODED_LEN: usize = 37usize;
5800    fn deser(
5801        _version: MavlinkVersion,
5802        __input: &[u8],
5803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5804        let avail_len = __input.len();
5805        let mut payload_buf = [0; Self::ENCODED_LEN];
5806        let mut buf = if avail_len < Self::ENCODED_LEN {
5807            payload_buf[0..avail_len].copy_from_slice(__input);
5808            Bytes::new(&payload_buf)
5809        } else {
5810            Bytes::new(__input)
5811        };
5812        let mut __struct = Self::default();
5813        __struct.time_boot_ms = buf.get_u32_le();
5814        for v in &mut __struct.q {
5815            let val = buf.get_f32_le();
5816            *v = val;
5817        }
5818        __struct.body_roll_rate = buf.get_f32_le();
5819        __struct.body_pitch_rate = buf.get_f32_le();
5820        __struct.body_yaw_rate = buf.get_f32_le();
5821        __struct.thrust = buf.get_f32_le();
5822        let tmp = buf.get_u8();
5823        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5824            tmp & AttitudeTargetTypemask::all().bits(),
5825        )
5826        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5827            flag_type: "AttitudeTargetTypemask",
5828            value: tmp as u32,
5829        })?;
5830        Ok(__struct)
5831    }
5832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5833        let mut __tmp = BytesMut::new(bytes);
5834        #[allow(clippy::absurd_extreme_comparisons)]
5835        #[allow(unused_comparisons)]
5836        if __tmp.remaining() < Self::ENCODED_LEN {
5837            panic!(
5838                "buffer is too small (need {} bytes, but got {})",
5839                Self::ENCODED_LEN,
5840                __tmp.remaining(),
5841            )
5842        }
5843        __tmp.put_u32_le(self.time_boot_ms);
5844        for val in &self.q {
5845            __tmp.put_f32_le(*val);
5846        }
5847        __tmp.put_f32_le(self.body_roll_rate);
5848        __tmp.put_f32_le(self.body_pitch_rate);
5849        __tmp.put_f32_le(self.body_yaw_rate);
5850        __tmp.put_f32_le(self.thrust);
5851        __tmp.put_u8(self.type_mask.bits());
5852        if matches!(version, MavlinkVersion::V2) {
5853            let len = __tmp.len();
5854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5855        } else {
5856            __tmp.len()
5857        }
5858    }
5859}
5860#[doc = "Motion capture attitude and position."]
5861#[doc = ""]
5862#[doc = "ID: 138"]
5863#[derive(Debug, Clone, PartialEq)]
5864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5866#[cfg_attr(feature = "ts", derive(TS))]
5867#[cfg_attr(feature = "ts", ts(export))]
5868pub struct ATT_POS_MOCAP_DATA {
5869    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5870    pub time_usec: u64,
5871    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5872    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5873    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5874    pub q: [f32; 4],
5875    #[doc = "X position (NED)"]
5876    pub x: f32,
5877    #[doc = "Y position (NED)"]
5878    pub y: f32,
5879    #[doc = "Z position (NED)"]
5880    pub z: f32,
5881    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5884    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5885    pub covariance: [f32; 21],
5886}
5887impl ATT_POS_MOCAP_DATA {
5888    pub const ENCODED_LEN: usize = 120usize;
5889    pub const DEFAULT: Self = Self {
5890        time_usec: 0_u64,
5891        q: [0.0_f32; 4usize],
5892        x: 0.0_f32,
5893        y: 0.0_f32,
5894        z: 0.0_f32,
5895        covariance: [0.0_f32; 21usize],
5896    };
5897    #[cfg(feature = "arbitrary")]
5898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5899        use arbitrary::{Arbitrary, Unstructured};
5900        let mut buf = [0u8; 1024];
5901        rng.fill_bytes(&mut buf);
5902        let mut unstructured = Unstructured::new(&buf);
5903        Self::arbitrary(&mut unstructured).unwrap_or_default()
5904    }
5905}
5906impl Default for ATT_POS_MOCAP_DATA {
5907    fn default() -> Self {
5908        Self::DEFAULT.clone()
5909    }
5910}
5911impl MessageData for ATT_POS_MOCAP_DATA {
5912    type Message = MavMessage;
5913    const ID: u32 = 138u32;
5914    const NAME: &'static str = "ATT_POS_MOCAP";
5915    const EXTRA_CRC: u8 = 109u8;
5916    const ENCODED_LEN: usize = 120usize;
5917    fn deser(
5918        _version: MavlinkVersion,
5919        __input: &[u8],
5920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5921        let avail_len = __input.len();
5922        let mut payload_buf = [0; Self::ENCODED_LEN];
5923        let mut buf = if avail_len < Self::ENCODED_LEN {
5924            payload_buf[0..avail_len].copy_from_slice(__input);
5925            Bytes::new(&payload_buf)
5926        } else {
5927            Bytes::new(__input)
5928        };
5929        let mut __struct = Self::default();
5930        __struct.time_usec = buf.get_u64_le();
5931        for v in &mut __struct.q {
5932            let val = buf.get_f32_le();
5933            *v = val;
5934        }
5935        __struct.x = buf.get_f32_le();
5936        __struct.y = buf.get_f32_le();
5937        __struct.z = buf.get_f32_le();
5938        for v in &mut __struct.covariance {
5939            let val = buf.get_f32_le();
5940            *v = val;
5941        }
5942        Ok(__struct)
5943    }
5944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5945        let mut __tmp = BytesMut::new(bytes);
5946        #[allow(clippy::absurd_extreme_comparisons)]
5947        #[allow(unused_comparisons)]
5948        if __tmp.remaining() < Self::ENCODED_LEN {
5949            panic!(
5950                "buffer is too small (need {} bytes, but got {})",
5951                Self::ENCODED_LEN,
5952                __tmp.remaining(),
5953            )
5954        }
5955        __tmp.put_u64_le(self.time_usec);
5956        for val in &self.q {
5957            __tmp.put_f32_le(*val);
5958        }
5959        __tmp.put_f32_le(self.x);
5960        __tmp.put_f32_le(self.y);
5961        __tmp.put_f32_le(self.z);
5962        if matches!(version, MavlinkVersion::V2) {
5963            for val in &self.covariance {
5964                __tmp.put_f32_le(*val);
5965            }
5966            let len = __tmp.len();
5967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5968        } else {
5969            __tmp.len()
5970        }
5971    }
5972}
5973#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5974#[doc = ""]
5975#[doc = "ID: 7"]
5976#[derive(Debug, Clone, PartialEq)]
5977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5979#[cfg_attr(feature = "ts", derive(TS))]
5980#[cfg_attr(feature = "ts", ts(export))]
5981pub struct AUTH_KEY_DATA {
5982    #[doc = "key"]
5983    #[cfg_attr(feature = "ts", ts(type = "string"))]
5984    pub key: CharArray<32>,
5985}
5986impl AUTH_KEY_DATA {
5987    pub const ENCODED_LEN: usize = 32usize;
5988    pub const DEFAULT: Self = Self {
5989        key: CharArray::new([0_u8; 32usize]),
5990    };
5991    #[cfg(feature = "arbitrary")]
5992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5993        use arbitrary::{Arbitrary, Unstructured};
5994        let mut buf = [0u8; 1024];
5995        rng.fill_bytes(&mut buf);
5996        let mut unstructured = Unstructured::new(&buf);
5997        Self::arbitrary(&mut unstructured).unwrap_or_default()
5998    }
5999}
6000impl Default for AUTH_KEY_DATA {
6001    fn default() -> Self {
6002        Self::DEFAULT.clone()
6003    }
6004}
6005impl MessageData for AUTH_KEY_DATA {
6006    type Message = MavMessage;
6007    const ID: u32 = 7u32;
6008    const NAME: &'static str = "AUTH_KEY";
6009    const EXTRA_CRC: u8 = 119u8;
6010    const ENCODED_LEN: usize = 32usize;
6011    fn deser(
6012        _version: MavlinkVersion,
6013        __input: &[u8],
6014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6015        let avail_len = __input.len();
6016        let mut payload_buf = [0; Self::ENCODED_LEN];
6017        let mut buf = if avail_len < Self::ENCODED_LEN {
6018            payload_buf[0..avail_len].copy_from_slice(__input);
6019            Bytes::new(&payload_buf)
6020        } else {
6021            Bytes::new(__input)
6022        };
6023        let mut __struct = Self::default();
6024        let mut tmp = [0_u8; 32usize];
6025        for v in &mut tmp {
6026            *v = buf.get_u8();
6027        }
6028        __struct.key = CharArray::new(tmp);
6029        Ok(__struct)
6030    }
6031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6032        let mut __tmp = BytesMut::new(bytes);
6033        #[allow(clippy::absurd_extreme_comparisons)]
6034        #[allow(unused_comparisons)]
6035        if __tmp.remaining() < Self::ENCODED_LEN {
6036            panic!(
6037                "buffer is too small (need {} bytes, but got {})",
6038                Self::ENCODED_LEN,
6039                __tmp.remaining(),
6040            )
6041        }
6042        for val in &self.key {
6043            __tmp.put_u8(*val);
6044        }
6045        if matches!(version, MavlinkVersion::V2) {
6046            let len = __tmp.len();
6047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6048        } else {
6049            __tmp.len()
6050        }
6051    }
6052}
6053#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6054#[doc = ""]
6055#[doc = "ID: 286"]
6056#[derive(Debug, Clone, PartialEq)]
6057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6059#[cfg_attr(feature = "ts", derive(TS))]
6060#[cfg_attr(feature = "ts", ts(export))]
6061pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6062    #[doc = "Timestamp (time since system boot)."]
6063    pub time_boot_us: u64,
6064    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6066    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6067    pub q: [f32; 4],
6068    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6069    pub q_estimated_delay_us: u32,
6070    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6071    pub vx: f32,
6072    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6073    pub vy: f32,
6074    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6075    pub vz: f32,
6076    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6077    pub v_estimated_delay_us: u32,
6078    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6079    pub feed_forward_angular_velocity_z: f32,
6080    #[doc = "Bitmap indicating which estimator outputs are valid."]
6081    pub estimator_status: EstimatorStatusFlags,
6082    #[doc = "System ID"]
6083    pub target_system: u8,
6084    #[doc = "Component ID"]
6085    pub target_component: u8,
6086    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6087    pub landed_state: MavLandedState,
6088    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6090    pub angular_velocity_z: f32,
6091}
6092impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6093    pub const ENCODED_LEN: usize = 57usize;
6094    pub const DEFAULT: Self = Self {
6095        time_boot_us: 0_u64,
6096        q: [0.0_f32; 4usize],
6097        q_estimated_delay_us: 0_u32,
6098        vx: 0.0_f32,
6099        vy: 0.0_f32,
6100        vz: 0.0_f32,
6101        v_estimated_delay_us: 0_u32,
6102        feed_forward_angular_velocity_z: 0.0_f32,
6103        estimator_status: EstimatorStatusFlags::DEFAULT,
6104        target_system: 0_u8,
6105        target_component: 0_u8,
6106        landed_state: MavLandedState::DEFAULT,
6107        angular_velocity_z: 0.0_f32,
6108    };
6109    #[cfg(feature = "arbitrary")]
6110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6111        use arbitrary::{Arbitrary, Unstructured};
6112        let mut buf = [0u8; 1024];
6113        rng.fill_bytes(&mut buf);
6114        let mut unstructured = Unstructured::new(&buf);
6115        Self::arbitrary(&mut unstructured).unwrap_or_default()
6116    }
6117}
6118impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6119    fn default() -> Self {
6120        Self::DEFAULT.clone()
6121    }
6122}
6123impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6124    type Message = MavMessage;
6125    const ID: u32 = 286u32;
6126    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6127    const EXTRA_CRC: u8 = 210u8;
6128    const ENCODED_LEN: usize = 57usize;
6129    fn deser(
6130        _version: MavlinkVersion,
6131        __input: &[u8],
6132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6133        let avail_len = __input.len();
6134        let mut payload_buf = [0; Self::ENCODED_LEN];
6135        let mut buf = if avail_len < Self::ENCODED_LEN {
6136            payload_buf[0..avail_len].copy_from_slice(__input);
6137            Bytes::new(&payload_buf)
6138        } else {
6139            Bytes::new(__input)
6140        };
6141        let mut __struct = Self::default();
6142        __struct.time_boot_us = buf.get_u64_le();
6143        for v in &mut __struct.q {
6144            let val = buf.get_f32_le();
6145            *v = val;
6146        }
6147        __struct.q_estimated_delay_us = buf.get_u32_le();
6148        __struct.vx = buf.get_f32_le();
6149        __struct.vy = buf.get_f32_le();
6150        __struct.vz = buf.get_f32_le();
6151        __struct.v_estimated_delay_us = buf.get_u32_le();
6152        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6153        let tmp = buf.get_u16_le();
6154        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6155            tmp & EstimatorStatusFlags::all().bits(),
6156        )
6157        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6158            flag_type: "EstimatorStatusFlags",
6159            value: tmp as u32,
6160        })?;
6161        __struct.target_system = buf.get_u8();
6162        __struct.target_component = buf.get_u8();
6163        let tmp = buf.get_u8();
6164        __struct.landed_state =
6165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6166                enum_type: "MavLandedState",
6167                value: tmp as u32,
6168            })?;
6169        __struct.angular_velocity_z = buf.get_f32_le();
6170        Ok(__struct)
6171    }
6172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6173        let mut __tmp = BytesMut::new(bytes);
6174        #[allow(clippy::absurd_extreme_comparisons)]
6175        #[allow(unused_comparisons)]
6176        if __tmp.remaining() < Self::ENCODED_LEN {
6177            panic!(
6178                "buffer is too small (need {} bytes, but got {})",
6179                Self::ENCODED_LEN,
6180                __tmp.remaining(),
6181            )
6182        }
6183        __tmp.put_u64_le(self.time_boot_us);
6184        for val in &self.q {
6185            __tmp.put_f32_le(*val);
6186        }
6187        __tmp.put_u32_le(self.q_estimated_delay_us);
6188        __tmp.put_f32_le(self.vx);
6189        __tmp.put_f32_le(self.vy);
6190        __tmp.put_f32_le(self.vz);
6191        __tmp.put_u32_le(self.v_estimated_delay_us);
6192        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6193        __tmp.put_u16_le(self.estimator_status.bits());
6194        __tmp.put_u8(self.target_system);
6195        __tmp.put_u8(self.target_component);
6196        __tmp.put_u8(self.landed_state as u8);
6197        if matches!(version, MavlinkVersion::V2) {
6198            __tmp.put_f32_le(self.angular_velocity_z);
6199            let len = __tmp.len();
6200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6201        } else {
6202            __tmp.len()
6203        }
6204    }
6205}
6206#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6207#[doc = ""]
6208#[doc = "ID: 148"]
6209#[derive(Debug, Clone, PartialEq)]
6210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6212#[cfg_attr(feature = "ts", derive(TS))]
6213#[cfg_attr(feature = "ts", ts(export))]
6214pub struct AUTOPILOT_VERSION_DATA {
6215    #[doc = "Bitmap of capabilities"]
6216    pub capabilities: MavProtocolCapability,
6217    #[doc = "UID if provided by hardware (see uid2)"]
6218    pub uid: u64,
6219    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6220    pub flight_sw_version: u32,
6221    #[doc = "Middleware version number"]
6222    pub middleware_sw_version: u32,
6223    #[doc = "Operating system version number"]
6224    pub os_sw_version: u32,
6225    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6226    pub board_version: u32,
6227    #[doc = "ID of the board vendor"]
6228    pub vendor_id: u16,
6229    #[doc = "ID of the product"]
6230    pub product_id: u16,
6231    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6233    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6234    pub flight_custom_version: [u8; 8],
6235    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6237    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6238    pub middleware_custom_version: [u8; 8],
6239    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6241    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6242    pub os_custom_version: [u8; 8],
6243    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6244    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6246    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6247    pub uid2: [u8; 18],
6248}
6249impl AUTOPILOT_VERSION_DATA {
6250    pub const ENCODED_LEN: usize = 78usize;
6251    pub const DEFAULT: Self = Self {
6252        capabilities: MavProtocolCapability::DEFAULT,
6253        uid: 0_u64,
6254        flight_sw_version: 0_u32,
6255        middleware_sw_version: 0_u32,
6256        os_sw_version: 0_u32,
6257        board_version: 0_u32,
6258        vendor_id: 0_u16,
6259        product_id: 0_u16,
6260        flight_custom_version: [0_u8; 8usize],
6261        middleware_custom_version: [0_u8; 8usize],
6262        os_custom_version: [0_u8; 8usize],
6263        uid2: [0_u8; 18usize],
6264    };
6265    #[cfg(feature = "arbitrary")]
6266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6267        use arbitrary::{Arbitrary, Unstructured};
6268        let mut buf = [0u8; 1024];
6269        rng.fill_bytes(&mut buf);
6270        let mut unstructured = Unstructured::new(&buf);
6271        Self::arbitrary(&mut unstructured).unwrap_or_default()
6272    }
6273}
6274impl Default for AUTOPILOT_VERSION_DATA {
6275    fn default() -> Self {
6276        Self::DEFAULT.clone()
6277    }
6278}
6279impl MessageData for AUTOPILOT_VERSION_DATA {
6280    type Message = MavMessage;
6281    const ID: u32 = 148u32;
6282    const NAME: &'static str = "AUTOPILOT_VERSION";
6283    const EXTRA_CRC: u8 = 178u8;
6284    const ENCODED_LEN: usize = 78usize;
6285    fn deser(
6286        _version: MavlinkVersion,
6287        __input: &[u8],
6288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6289        let avail_len = __input.len();
6290        let mut payload_buf = [0; Self::ENCODED_LEN];
6291        let mut buf = if avail_len < Self::ENCODED_LEN {
6292            payload_buf[0..avail_len].copy_from_slice(__input);
6293            Bytes::new(&payload_buf)
6294        } else {
6295            Bytes::new(__input)
6296        };
6297        let mut __struct = Self::default();
6298        let tmp = buf.get_u64_le();
6299        __struct.capabilities = MavProtocolCapability::from_bits(
6300            tmp & MavProtocolCapability::all().bits(),
6301        )
6302        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6303            flag_type: "MavProtocolCapability",
6304            value: tmp as u32,
6305        })?;
6306        __struct.uid = buf.get_u64_le();
6307        __struct.flight_sw_version = buf.get_u32_le();
6308        __struct.middleware_sw_version = buf.get_u32_le();
6309        __struct.os_sw_version = buf.get_u32_le();
6310        __struct.board_version = buf.get_u32_le();
6311        __struct.vendor_id = buf.get_u16_le();
6312        __struct.product_id = buf.get_u16_le();
6313        for v in &mut __struct.flight_custom_version {
6314            let val = buf.get_u8();
6315            *v = val;
6316        }
6317        for v in &mut __struct.middleware_custom_version {
6318            let val = buf.get_u8();
6319            *v = val;
6320        }
6321        for v in &mut __struct.os_custom_version {
6322            let val = buf.get_u8();
6323            *v = val;
6324        }
6325        for v in &mut __struct.uid2 {
6326            let val = buf.get_u8();
6327            *v = val;
6328        }
6329        Ok(__struct)
6330    }
6331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6332        let mut __tmp = BytesMut::new(bytes);
6333        #[allow(clippy::absurd_extreme_comparisons)]
6334        #[allow(unused_comparisons)]
6335        if __tmp.remaining() < Self::ENCODED_LEN {
6336            panic!(
6337                "buffer is too small (need {} bytes, but got {})",
6338                Self::ENCODED_LEN,
6339                __tmp.remaining(),
6340            )
6341        }
6342        __tmp.put_u64_le(self.capabilities.bits());
6343        __tmp.put_u64_le(self.uid);
6344        __tmp.put_u32_le(self.flight_sw_version);
6345        __tmp.put_u32_le(self.middleware_sw_version);
6346        __tmp.put_u32_le(self.os_sw_version);
6347        __tmp.put_u32_le(self.board_version);
6348        __tmp.put_u16_le(self.vendor_id);
6349        __tmp.put_u16_le(self.product_id);
6350        for val in &self.flight_custom_version {
6351            __tmp.put_u8(*val);
6352        }
6353        for val in &self.middleware_custom_version {
6354            __tmp.put_u8(*val);
6355        }
6356        for val in &self.os_custom_version {
6357            __tmp.put_u8(*val);
6358        }
6359        if matches!(version, MavlinkVersion::V2) {
6360            for val in &self.uid2 {
6361                __tmp.put_u8(*val);
6362            }
6363            let len = __tmp.len();
6364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6365        } else {
6366            __tmp.len()
6367        }
6368    }
6369}
6370#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6371#[doc = ""]
6372#[doc = "ID: 435"]
6373#[derive(Debug, Clone, PartialEq)]
6374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6376#[cfg_attr(feature = "ts", derive(TS))]
6377#[cfg_attr(feature = "ts", ts(export))]
6378pub struct AVAILABLE_MODES_DATA {
6379    #[doc = "A bitfield for use for autopilot-specific flags"]
6380    pub custom_mode: u32,
6381    #[doc = "Mode properties."]
6382    pub properties: MavModeProperty,
6383    #[doc = "The total number of available modes for the current vehicle type."]
6384    pub number_modes: u8,
6385    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6386    pub mode_index: u8,
6387    #[doc = "Standard mode."]
6388    pub standard_mode: MavStandardMode,
6389    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6390    #[cfg_attr(feature = "ts", ts(type = "string"))]
6391    pub mode_name: CharArray<35>,
6392}
6393impl AVAILABLE_MODES_DATA {
6394    pub const ENCODED_LEN: usize = 46usize;
6395    pub const DEFAULT: Self = Self {
6396        custom_mode: 0_u32,
6397        properties: MavModeProperty::DEFAULT,
6398        number_modes: 0_u8,
6399        mode_index: 0_u8,
6400        standard_mode: MavStandardMode::DEFAULT,
6401        mode_name: CharArray::new([0_u8; 35usize]),
6402    };
6403    #[cfg(feature = "arbitrary")]
6404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6405        use arbitrary::{Arbitrary, Unstructured};
6406        let mut buf = [0u8; 1024];
6407        rng.fill_bytes(&mut buf);
6408        let mut unstructured = Unstructured::new(&buf);
6409        Self::arbitrary(&mut unstructured).unwrap_or_default()
6410    }
6411}
6412impl Default for AVAILABLE_MODES_DATA {
6413    fn default() -> Self {
6414        Self::DEFAULT.clone()
6415    }
6416}
6417impl MessageData for AVAILABLE_MODES_DATA {
6418    type Message = MavMessage;
6419    const ID: u32 = 435u32;
6420    const NAME: &'static str = "AVAILABLE_MODES";
6421    const EXTRA_CRC: u8 = 134u8;
6422    const ENCODED_LEN: usize = 46usize;
6423    fn deser(
6424        _version: MavlinkVersion,
6425        __input: &[u8],
6426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6427        let avail_len = __input.len();
6428        let mut payload_buf = [0; Self::ENCODED_LEN];
6429        let mut buf = if avail_len < Self::ENCODED_LEN {
6430            payload_buf[0..avail_len].copy_from_slice(__input);
6431            Bytes::new(&payload_buf)
6432        } else {
6433            Bytes::new(__input)
6434        };
6435        let mut __struct = Self::default();
6436        __struct.custom_mode = buf.get_u32_le();
6437        let tmp = buf.get_u32_le();
6438        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6439            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6440                flag_type: "MavModeProperty",
6441                value: tmp as u32,
6442            })?;
6443        __struct.number_modes = buf.get_u8();
6444        __struct.mode_index = buf.get_u8();
6445        let tmp = buf.get_u8();
6446        __struct.standard_mode =
6447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6448                enum_type: "MavStandardMode",
6449                value: tmp as u32,
6450            })?;
6451        let mut tmp = [0_u8; 35usize];
6452        for v in &mut tmp {
6453            *v = buf.get_u8();
6454        }
6455        __struct.mode_name = CharArray::new(tmp);
6456        Ok(__struct)
6457    }
6458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6459        let mut __tmp = BytesMut::new(bytes);
6460        #[allow(clippy::absurd_extreme_comparisons)]
6461        #[allow(unused_comparisons)]
6462        if __tmp.remaining() < Self::ENCODED_LEN {
6463            panic!(
6464                "buffer is too small (need {} bytes, but got {})",
6465                Self::ENCODED_LEN,
6466                __tmp.remaining(),
6467            )
6468        }
6469        __tmp.put_u32_le(self.custom_mode);
6470        __tmp.put_u32_le(self.properties.bits());
6471        __tmp.put_u8(self.number_modes);
6472        __tmp.put_u8(self.mode_index);
6473        __tmp.put_u8(self.standard_mode as u8);
6474        for val in &self.mode_name {
6475            __tmp.put_u8(*val);
6476        }
6477        if matches!(version, MavlinkVersion::V2) {
6478            let len = __tmp.len();
6479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6480        } else {
6481            __tmp.len()
6482        }
6483    }
6484}
6485#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6486#[doc = ""]
6487#[doc = "ID: 437"]
6488#[derive(Debug, Clone, PartialEq)]
6489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6491#[cfg_attr(feature = "ts", derive(TS))]
6492#[cfg_attr(feature = "ts", ts(export))]
6493pub struct AVAILABLE_MODES_MONITOR_DATA {
6494    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6495    pub seq: u8,
6496}
6497impl AVAILABLE_MODES_MONITOR_DATA {
6498    pub const ENCODED_LEN: usize = 1usize;
6499    pub const DEFAULT: Self = Self { seq: 0_u8 };
6500    #[cfg(feature = "arbitrary")]
6501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6502        use arbitrary::{Arbitrary, Unstructured};
6503        let mut buf = [0u8; 1024];
6504        rng.fill_bytes(&mut buf);
6505        let mut unstructured = Unstructured::new(&buf);
6506        Self::arbitrary(&mut unstructured).unwrap_or_default()
6507    }
6508}
6509impl Default for AVAILABLE_MODES_MONITOR_DATA {
6510    fn default() -> Self {
6511        Self::DEFAULT.clone()
6512    }
6513}
6514impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6515    type Message = MavMessage;
6516    const ID: u32 = 437u32;
6517    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6518    const EXTRA_CRC: u8 = 30u8;
6519    const ENCODED_LEN: usize = 1usize;
6520    fn deser(
6521        _version: MavlinkVersion,
6522        __input: &[u8],
6523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6524        let avail_len = __input.len();
6525        let mut payload_buf = [0; Self::ENCODED_LEN];
6526        let mut buf = if avail_len < Self::ENCODED_LEN {
6527            payload_buf[0..avail_len].copy_from_slice(__input);
6528            Bytes::new(&payload_buf)
6529        } else {
6530            Bytes::new(__input)
6531        };
6532        let mut __struct = Self::default();
6533        __struct.seq = buf.get_u8();
6534        Ok(__struct)
6535    }
6536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6537        let mut __tmp = BytesMut::new(bytes);
6538        #[allow(clippy::absurd_extreme_comparisons)]
6539        #[allow(unused_comparisons)]
6540        if __tmp.remaining() < Self::ENCODED_LEN {
6541            panic!(
6542                "buffer is too small (need {} bytes, but got {})",
6543                Self::ENCODED_LEN,
6544                __tmp.remaining(),
6545            )
6546        }
6547        __tmp.put_u8(self.seq);
6548        if matches!(version, MavlinkVersion::V2) {
6549            let len = __tmp.len();
6550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6551        } else {
6552            __tmp.len()
6553        }
6554    }
6555}
6556#[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6557#[doc = ""]
6558#[doc = "ID: 60052"]
6559#[derive(Debug, Clone, PartialEq)]
6560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6562#[cfg_attr(feature = "ts", derive(TS))]
6563#[cfg_attr(feature = "ts", ts(export))]
6564pub struct AVSS_DRONE_IMU_DATA {
6565    #[doc = "Timestamp (time since FC boot)."]
6566    pub time_boot_ms: u32,
6567    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
6568    pub q1: f32,
6569    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
6570    pub q2: f32,
6571    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
6572    pub q3: f32,
6573    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
6574    pub q4: f32,
6575    #[doc = "X acceleration"]
6576    pub xacc: f32,
6577    #[doc = "Y acceleration"]
6578    pub yacc: f32,
6579    #[doc = "Z acceleration"]
6580    pub zacc: f32,
6581    #[doc = "Angular speed around X axis"]
6582    pub xgyro: f32,
6583    #[doc = "Angular speed around Y axis"]
6584    pub ygyro: f32,
6585    #[doc = "Angular speed around Z axis"]
6586    pub zgyro: f32,
6587}
6588impl AVSS_DRONE_IMU_DATA {
6589    pub const ENCODED_LEN: usize = 44usize;
6590    pub const DEFAULT: Self = Self {
6591        time_boot_ms: 0_u32,
6592        q1: 0.0_f32,
6593        q2: 0.0_f32,
6594        q3: 0.0_f32,
6595        q4: 0.0_f32,
6596        xacc: 0.0_f32,
6597        yacc: 0.0_f32,
6598        zacc: 0.0_f32,
6599        xgyro: 0.0_f32,
6600        ygyro: 0.0_f32,
6601        zgyro: 0.0_f32,
6602    };
6603    #[cfg(feature = "arbitrary")]
6604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6605        use arbitrary::{Arbitrary, Unstructured};
6606        let mut buf = [0u8; 1024];
6607        rng.fill_bytes(&mut buf);
6608        let mut unstructured = Unstructured::new(&buf);
6609        Self::arbitrary(&mut unstructured).unwrap_or_default()
6610    }
6611}
6612impl Default for AVSS_DRONE_IMU_DATA {
6613    fn default() -> Self {
6614        Self::DEFAULT.clone()
6615    }
6616}
6617impl MessageData for AVSS_DRONE_IMU_DATA {
6618    type Message = MavMessage;
6619    const ID: u32 = 60052u32;
6620    const NAME: &'static str = "AVSS_DRONE_IMU";
6621    const EXTRA_CRC: u8 = 101u8;
6622    const ENCODED_LEN: usize = 44usize;
6623    fn deser(
6624        _version: MavlinkVersion,
6625        __input: &[u8],
6626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6627        let avail_len = __input.len();
6628        let mut payload_buf = [0; Self::ENCODED_LEN];
6629        let mut buf = if avail_len < Self::ENCODED_LEN {
6630            payload_buf[0..avail_len].copy_from_slice(__input);
6631            Bytes::new(&payload_buf)
6632        } else {
6633            Bytes::new(__input)
6634        };
6635        let mut __struct = Self::default();
6636        __struct.time_boot_ms = buf.get_u32_le();
6637        __struct.q1 = buf.get_f32_le();
6638        __struct.q2 = buf.get_f32_le();
6639        __struct.q3 = buf.get_f32_le();
6640        __struct.q4 = buf.get_f32_le();
6641        __struct.xacc = buf.get_f32_le();
6642        __struct.yacc = buf.get_f32_le();
6643        __struct.zacc = buf.get_f32_le();
6644        __struct.xgyro = buf.get_f32_le();
6645        __struct.ygyro = buf.get_f32_le();
6646        __struct.zgyro = buf.get_f32_le();
6647        Ok(__struct)
6648    }
6649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6650        let mut __tmp = BytesMut::new(bytes);
6651        #[allow(clippy::absurd_extreme_comparisons)]
6652        #[allow(unused_comparisons)]
6653        if __tmp.remaining() < Self::ENCODED_LEN {
6654            panic!(
6655                "buffer is too small (need {} bytes, but got {})",
6656                Self::ENCODED_LEN,
6657                __tmp.remaining(),
6658            )
6659        }
6660        __tmp.put_u32_le(self.time_boot_ms);
6661        __tmp.put_f32_le(self.q1);
6662        __tmp.put_f32_le(self.q2);
6663        __tmp.put_f32_le(self.q3);
6664        __tmp.put_f32_le(self.q4);
6665        __tmp.put_f32_le(self.xacc);
6666        __tmp.put_f32_le(self.yacc);
6667        __tmp.put_f32_le(self.zacc);
6668        __tmp.put_f32_le(self.xgyro);
6669        __tmp.put_f32_le(self.ygyro);
6670        __tmp.put_f32_le(self.zgyro);
6671        if matches!(version, MavlinkVersion::V2) {
6672            let len = __tmp.len();
6673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6674        } else {
6675            __tmp.len()
6676        }
6677    }
6678}
6679#[doc = "Drone operation mode."]
6680#[doc = ""]
6681#[doc = "ID: 60053"]
6682#[derive(Debug, Clone, PartialEq)]
6683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6685#[cfg_attr(feature = "ts", derive(TS))]
6686#[cfg_attr(feature = "ts", ts(export))]
6687pub struct AVSS_DRONE_OPERATION_MODE_DATA {
6688    #[doc = "Timestamp (time since FC boot)."]
6689    pub time_boot_ms: u32,
6690    #[doc = "DJI M300 operation mode"]
6691    pub M300_operation_mode: u8,
6692    #[doc = "horsefly operation mode"]
6693    pub horsefly_operation_mode: u8,
6694}
6695impl AVSS_DRONE_OPERATION_MODE_DATA {
6696    pub const ENCODED_LEN: usize = 6usize;
6697    pub const DEFAULT: Self = Self {
6698        time_boot_ms: 0_u32,
6699        M300_operation_mode: 0_u8,
6700        horsefly_operation_mode: 0_u8,
6701    };
6702    #[cfg(feature = "arbitrary")]
6703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6704        use arbitrary::{Arbitrary, Unstructured};
6705        let mut buf = [0u8; 1024];
6706        rng.fill_bytes(&mut buf);
6707        let mut unstructured = Unstructured::new(&buf);
6708        Self::arbitrary(&mut unstructured).unwrap_or_default()
6709    }
6710}
6711impl Default for AVSS_DRONE_OPERATION_MODE_DATA {
6712    fn default() -> Self {
6713        Self::DEFAULT.clone()
6714    }
6715}
6716impl MessageData for AVSS_DRONE_OPERATION_MODE_DATA {
6717    type Message = MavMessage;
6718    const ID: u32 = 60053u32;
6719    const NAME: &'static str = "AVSS_DRONE_OPERATION_MODE";
6720    const EXTRA_CRC: u8 = 45u8;
6721    const ENCODED_LEN: usize = 6usize;
6722    fn deser(
6723        _version: MavlinkVersion,
6724        __input: &[u8],
6725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6726        let avail_len = __input.len();
6727        let mut payload_buf = [0; Self::ENCODED_LEN];
6728        let mut buf = if avail_len < Self::ENCODED_LEN {
6729            payload_buf[0..avail_len].copy_from_slice(__input);
6730            Bytes::new(&payload_buf)
6731        } else {
6732            Bytes::new(__input)
6733        };
6734        let mut __struct = Self::default();
6735        __struct.time_boot_ms = buf.get_u32_le();
6736        __struct.M300_operation_mode = buf.get_u8();
6737        __struct.horsefly_operation_mode = buf.get_u8();
6738        Ok(__struct)
6739    }
6740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6741        let mut __tmp = BytesMut::new(bytes);
6742        #[allow(clippy::absurd_extreme_comparisons)]
6743        #[allow(unused_comparisons)]
6744        if __tmp.remaining() < Self::ENCODED_LEN {
6745            panic!(
6746                "buffer is too small (need {} bytes, but got {})",
6747                Self::ENCODED_LEN,
6748                __tmp.remaining(),
6749            )
6750        }
6751        __tmp.put_u32_le(self.time_boot_ms);
6752        __tmp.put_u8(self.M300_operation_mode);
6753        __tmp.put_u8(self.horsefly_operation_mode);
6754        if matches!(version, MavlinkVersion::V2) {
6755            let len = __tmp.len();
6756            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6757        } else {
6758            __tmp.len()
6759        }
6760    }
6761}
6762#[doc = "Drone position."]
6763#[doc = ""]
6764#[doc = "ID: 60051"]
6765#[derive(Debug, Clone, PartialEq)]
6766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6768#[cfg_attr(feature = "ts", derive(TS))]
6769#[cfg_attr(feature = "ts", ts(export))]
6770pub struct AVSS_DRONE_POSITION_DATA {
6771    #[doc = "Timestamp (time since FC boot)."]
6772    pub time_boot_ms: u32,
6773    #[doc = "Latitude, expressed"]
6774    pub lat: i32,
6775    #[doc = "Longitude, expressed"]
6776    pub lon: i32,
6777    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
6778    pub alt: i32,
6779    #[doc = "Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar"]
6780    pub ground_alt: f32,
6781    #[doc = "This altitude is measured by a barometer"]
6782    pub barometer_alt: f32,
6783}
6784impl AVSS_DRONE_POSITION_DATA {
6785    pub const ENCODED_LEN: usize = 24usize;
6786    pub const DEFAULT: Self = Self {
6787        time_boot_ms: 0_u32,
6788        lat: 0_i32,
6789        lon: 0_i32,
6790        alt: 0_i32,
6791        ground_alt: 0.0_f32,
6792        barometer_alt: 0.0_f32,
6793    };
6794    #[cfg(feature = "arbitrary")]
6795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6796        use arbitrary::{Arbitrary, Unstructured};
6797        let mut buf = [0u8; 1024];
6798        rng.fill_bytes(&mut buf);
6799        let mut unstructured = Unstructured::new(&buf);
6800        Self::arbitrary(&mut unstructured).unwrap_or_default()
6801    }
6802}
6803impl Default for AVSS_DRONE_POSITION_DATA {
6804    fn default() -> Self {
6805        Self::DEFAULT.clone()
6806    }
6807}
6808impl MessageData for AVSS_DRONE_POSITION_DATA {
6809    type Message = MavMessage;
6810    const ID: u32 = 60051u32;
6811    const NAME: &'static str = "AVSS_DRONE_POSITION";
6812    const EXTRA_CRC: u8 = 245u8;
6813    const ENCODED_LEN: usize = 24usize;
6814    fn deser(
6815        _version: MavlinkVersion,
6816        __input: &[u8],
6817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6818        let avail_len = __input.len();
6819        let mut payload_buf = [0; Self::ENCODED_LEN];
6820        let mut buf = if avail_len < Self::ENCODED_LEN {
6821            payload_buf[0..avail_len].copy_from_slice(__input);
6822            Bytes::new(&payload_buf)
6823        } else {
6824            Bytes::new(__input)
6825        };
6826        let mut __struct = Self::default();
6827        __struct.time_boot_ms = buf.get_u32_le();
6828        __struct.lat = buf.get_i32_le();
6829        __struct.lon = buf.get_i32_le();
6830        __struct.alt = buf.get_i32_le();
6831        __struct.ground_alt = buf.get_f32_le();
6832        __struct.barometer_alt = buf.get_f32_le();
6833        Ok(__struct)
6834    }
6835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6836        let mut __tmp = BytesMut::new(bytes);
6837        #[allow(clippy::absurd_extreme_comparisons)]
6838        #[allow(unused_comparisons)]
6839        if __tmp.remaining() < Self::ENCODED_LEN {
6840            panic!(
6841                "buffer is too small (need {} bytes, but got {})",
6842                Self::ENCODED_LEN,
6843                __tmp.remaining(),
6844            )
6845        }
6846        __tmp.put_u32_le(self.time_boot_ms);
6847        __tmp.put_i32_le(self.lat);
6848        __tmp.put_i32_le(self.lon);
6849        __tmp.put_i32_le(self.alt);
6850        __tmp.put_f32_le(self.ground_alt);
6851        __tmp.put_f32_le(self.barometer_alt);
6852        if matches!(version, MavlinkVersion::V2) {
6853            let len = __tmp.len();
6854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6855        } else {
6856            __tmp.len()
6857        }
6858    }
6859}
6860#[doc = "AVSS PRS system status."]
6861#[doc = ""]
6862#[doc = "ID: 60050"]
6863#[derive(Debug, Clone, PartialEq)]
6864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6866#[cfg_attr(feature = "ts", derive(TS))]
6867#[cfg_attr(feature = "ts", ts(export))]
6868pub struct AVSS_PRS_SYS_STATUS_DATA {
6869    #[doc = "Timestamp (time since PRS boot)."]
6870    pub time_boot_ms: u32,
6871    #[doc = "PRS error statuses"]
6872    pub error_status: u32,
6873    #[doc = "Estimated battery run-time without a remote connection and PRS battery voltage"]
6874    pub battery_status: u32,
6875    #[doc = "PRS arm statuses"]
6876    pub arm_status: u8,
6877    #[doc = "PRS battery charge statuses"]
6878    pub charge_status: u8,
6879}
6880impl AVSS_PRS_SYS_STATUS_DATA {
6881    pub const ENCODED_LEN: usize = 14usize;
6882    pub const DEFAULT: Self = Self {
6883        time_boot_ms: 0_u32,
6884        error_status: 0_u32,
6885        battery_status: 0_u32,
6886        arm_status: 0_u8,
6887        charge_status: 0_u8,
6888    };
6889    #[cfg(feature = "arbitrary")]
6890    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6891        use arbitrary::{Arbitrary, Unstructured};
6892        let mut buf = [0u8; 1024];
6893        rng.fill_bytes(&mut buf);
6894        let mut unstructured = Unstructured::new(&buf);
6895        Self::arbitrary(&mut unstructured).unwrap_or_default()
6896    }
6897}
6898impl Default for AVSS_PRS_SYS_STATUS_DATA {
6899    fn default() -> Self {
6900        Self::DEFAULT.clone()
6901    }
6902}
6903impl MessageData for AVSS_PRS_SYS_STATUS_DATA {
6904    type Message = MavMessage;
6905    const ID: u32 = 60050u32;
6906    const NAME: &'static str = "AVSS_PRS_SYS_STATUS";
6907    const EXTRA_CRC: u8 = 220u8;
6908    const ENCODED_LEN: usize = 14usize;
6909    fn deser(
6910        _version: MavlinkVersion,
6911        __input: &[u8],
6912    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6913        let avail_len = __input.len();
6914        let mut payload_buf = [0; Self::ENCODED_LEN];
6915        let mut buf = if avail_len < Self::ENCODED_LEN {
6916            payload_buf[0..avail_len].copy_from_slice(__input);
6917            Bytes::new(&payload_buf)
6918        } else {
6919            Bytes::new(__input)
6920        };
6921        let mut __struct = Self::default();
6922        __struct.time_boot_ms = buf.get_u32_le();
6923        __struct.error_status = buf.get_u32_le();
6924        __struct.battery_status = buf.get_u32_le();
6925        __struct.arm_status = buf.get_u8();
6926        __struct.charge_status = buf.get_u8();
6927        Ok(__struct)
6928    }
6929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6930        let mut __tmp = BytesMut::new(bytes);
6931        #[allow(clippy::absurd_extreme_comparisons)]
6932        #[allow(unused_comparisons)]
6933        if __tmp.remaining() < Self::ENCODED_LEN {
6934            panic!(
6935                "buffer is too small (need {} bytes, but got {})",
6936                Self::ENCODED_LEN,
6937                __tmp.remaining(),
6938            )
6939        }
6940        __tmp.put_u32_le(self.time_boot_ms);
6941        __tmp.put_u32_le(self.error_status);
6942        __tmp.put_u32_le(self.battery_status);
6943        __tmp.put_u8(self.arm_status);
6944        __tmp.put_u8(self.charge_status);
6945        if matches!(version, MavlinkVersion::V2) {
6946            let len = __tmp.len();
6947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6948        } else {
6949            __tmp.len()
6950        }
6951    }
6952}
6953#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6954#[doc = ""]
6955#[doc = "ID: 372"]
6956#[derive(Debug, Clone, PartialEq)]
6957#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6959#[cfg_attr(feature = "ts", derive(TS))]
6960#[cfg_attr(feature = "ts", ts(export))]
6961pub struct BATTERY_INFO_DATA {
6962    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6963    pub discharge_minimum_voltage: f32,
6964    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6965    pub charging_minimum_voltage: f32,
6966    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6967    pub resting_minimum_voltage: f32,
6968    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6969    pub charging_maximum_voltage: f32,
6970    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6971    pub charging_maximum_current: f32,
6972    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6973    pub nominal_voltage: f32,
6974    #[doc = "Maximum pack discharge current. 0: field not provided."]
6975    pub discharge_maximum_current: f32,
6976    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6977    pub discharge_maximum_burst_current: f32,
6978    #[doc = "Fully charged design capacity. 0: field not provided."]
6979    pub design_capacity: f32,
6980    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6981    pub full_charge_capacity: f32,
6982    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6983    pub cycle_count: u16,
6984    #[doc = "Battery weight. 0: field not provided."]
6985    pub weight: u16,
6986    #[doc = "Battery ID"]
6987    pub id: u8,
6988    #[doc = "Function of the battery."]
6989    pub battery_function: MavBatteryFunction,
6990    #[doc = "Type (chemistry) of the battery."]
6991    pub mavtype: MavBatteryType,
6992    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6993    pub state_of_health: u8,
6994    #[doc = "Number of battery cells in series. 0: field not provided."]
6995    pub cells_in_series: u8,
6996    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6997    #[cfg_attr(feature = "ts", ts(type = "string"))]
6998    pub manufacture_date: CharArray<9>,
6999    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7000    #[cfg_attr(feature = "ts", ts(type = "string"))]
7001    pub serial_number: CharArray<32>,
7002    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7003    #[cfg_attr(feature = "ts", ts(type = "string"))]
7004    pub name: CharArray<50>,
7005}
7006impl BATTERY_INFO_DATA {
7007    pub const ENCODED_LEN: usize = 140usize;
7008    pub const DEFAULT: Self = Self {
7009        discharge_minimum_voltage: 0.0_f32,
7010        charging_minimum_voltage: 0.0_f32,
7011        resting_minimum_voltage: 0.0_f32,
7012        charging_maximum_voltage: 0.0_f32,
7013        charging_maximum_current: 0.0_f32,
7014        nominal_voltage: 0.0_f32,
7015        discharge_maximum_current: 0.0_f32,
7016        discharge_maximum_burst_current: 0.0_f32,
7017        design_capacity: 0.0_f32,
7018        full_charge_capacity: 0.0_f32,
7019        cycle_count: 0_u16,
7020        weight: 0_u16,
7021        id: 0_u8,
7022        battery_function: MavBatteryFunction::DEFAULT,
7023        mavtype: MavBatteryType::DEFAULT,
7024        state_of_health: 0_u8,
7025        cells_in_series: 0_u8,
7026        manufacture_date: CharArray::new([0_u8; 9usize]),
7027        serial_number: CharArray::new([0_u8; 32usize]),
7028        name: CharArray::new([0_u8; 50usize]),
7029    };
7030    #[cfg(feature = "arbitrary")]
7031    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7032        use arbitrary::{Arbitrary, Unstructured};
7033        let mut buf = [0u8; 1024];
7034        rng.fill_bytes(&mut buf);
7035        let mut unstructured = Unstructured::new(&buf);
7036        Self::arbitrary(&mut unstructured).unwrap_or_default()
7037    }
7038}
7039impl Default for BATTERY_INFO_DATA {
7040    fn default() -> Self {
7041        Self::DEFAULT.clone()
7042    }
7043}
7044impl MessageData for BATTERY_INFO_DATA {
7045    type Message = MavMessage;
7046    const ID: u32 = 372u32;
7047    const NAME: &'static str = "BATTERY_INFO";
7048    const EXTRA_CRC: u8 = 26u8;
7049    const ENCODED_LEN: usize = 140usize;
7050    fn deser(
7051        _version: MavlinkVersion,
7052        __input: &[u8],
7053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7054        let avail_len = __input.len();
7055        let mut payload_buf = [0; Self::ENCODED_LEN];
7056        let mut buf = if avail_len < Self::ENCODED_LEN {
7057            payload_buf[0..avail_len].copy_from_slice(__input);
7058            Bytes::new(&payload_buf)
7059        } else {
7060            Bytes::new(__input)
7061        };
7062        let mut __struct = Self::default();
7063        __struct.discharge_minimum_voltage = buf.get_f32_le();
7064        __struct.charging_minimum_voltage = buf.get_f32_le();
7065        __struct.resting_minimum_voltage = buf.get_f32_le();
7066        __struct.charging_maximum_voltage = buf.get_f32_le();
7067        __struct.charging_maximum_current = buf.get_f32_le();
7068        __struct.nominal_voltage = buf.get_f32_le();
7069        __struct.discharge_maximum_current = buf.get_f32_le();
7070        __struct.discharge_maximum_burst_current = buf.get_f32_le();
7071        __struct.design_capacity = buf.get_f32_le();
7072        __struct.full_charge_capacity = buf.get_f32_le();
7073        __struct.cycle_count = buf.get_u16_le();
7074        __struct.weight = buf.get_u16_le();
7075        __struct.id = buf.get_u8();
7076        let tmp = buf.get_u8();
7077        __struct.battery_function =
7078            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7079                enum_type: "MavBatteryFunction",
7080                value: tmp as u32,
7081            })?;
7082        let tmp = buf.get_u8();
7083        __struct.mavtype =
7084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7085                enum_type: "MavBatteryType",
7086                value: tmp as u32,
7087            })?;
7088        __struct.state_of_health = buf.get_u8();
7089        __struct.cells_in_series = buf.get_u8();
7090        let mut tmp = [0_u8; 9usize];
7091        for v in &mut tmp {
7092            *v = buf.get_u8();
7093        }
7094        __struct.manufacture_date = CharArray::new(tmp);
7095        let mut tmp = [0_u8; 32usize];
7096        for v in &mut tmp {
7097            *v = buf.get_u8();
7098        }
7099        __struct.serial_number = CharArray::new(tmp);
7100        let mut tmp = [0_u8; 50usize];
7101        for v in &mut tmp {
7102            *v = buf.get_u8();
7103        }
7104        __struct.name = CharArray::new(tmp);
7105        Ok(__struct)
7106    }
7107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7108        let mut __tmp = BytesMut::new(bytes);
7109        #[allow(clippy::absurd_extreme_comparisons)]
7110        #[allow(unused_comparisons)]
7111        if __tmp.remaining() < Self::ENCODED_LEN {
7112            panic!(
7113                "buffer is too small (need {} bytes, but got {})",
7114                Self::ENCODED_LEN,
7115                __tmp.remaining(),
7116            )
7117        }
7118        __tmp.put_f32_le(self.discharge_minimum_voltage);
7119        __tmp.put_f32_le(self.charging_minimum_voltage);
7120        __tmp.put_f32_le(self.resting_minimum_voltage);
7121        __tmp.put_f32_le(self.charging_maximum_voltage);
7122        __tmp.put_f32_le(self.charging_maximum_current);
7123        __tmp.put_f32_le(self.nominal_voltage);
7124        __tmp.put_f32_le(self.discharge_maximum_current);
7125        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7126        __tmp.put_f32_le(self.design_capacity);
7127        __tmp.put_f32_le(self.full_charge_capacity);
7128        __tmp.put_u16_le(self.cycle_count);
7129        __tmp.put_u16_le(self.weight);
7130        __tmp.put_u8(self.id);
7131        __tmp.put_u8(self.battery_function as u8);
7132        __tmp.put_u8(self.mavtype as u8);
7133        __tmp.put_u8(self.state_of_health);
7134        __tmp.put_u8(self.cells_in_series);
7135        for val in &self.manufacture_date {
7136            __tmp.put_u8(*val);
7137        }
7138        for val in &self.serial_number {
7139            __tmp.put_u8(*val);
7140        }
7141        for val in &self.name {
7142            __tmp.put_u8(*val);
7143        }
7144        if matches!(version, MavlinkVersion::V2) {
7145            let len = __tmp.len();
7146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7147        } else {
7148            __tmp.len()
7149        }
7150    }
7151}
7152#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7153#[doc = ""]
7154#[doc = "ID: 147"]
7155#[derive(Debug, Clone, PartialEq)]
7156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7158#[cfg_attr(feature = "ts", derive(TS))]
7159#[cfg_attr(feature = "ts", ts(export))]
7160pub struct BATTERY_STATUS_DATA {
7161    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7162    pub current_consumed: i32,
7163    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7164    pub energy_consumed: i32,
7165    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7166    pub temperature: i16,
7167    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7168    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7169    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7170    pub voltages: [u16; 10],
7171    #[doc = "Battery current, -1: autopilot does not measure the current"]
7172    pub current_battery: i16,
7173    #[doc = "Battery ID"]
7174    pub id: u8,
7175    #[doc = "Function of the battery"]
7176    pub battery_function: MavBatteryFunction,
7177    #[doc = "Type (chemistry) of the battery"]
7178    pub mavtype: MavBatteryType,
7179    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7180    pub battery_remaining: i8,
7181    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7183    pub time_remaining: i32,
7184    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7185    #[cfg_attr(feature = "serde", serde(default))]
7186    pub charge_state: MavBatteryChargeState,
7187    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7190    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7191    pub voltages_ext: [u16; 4],
7192    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7193    #[cfg_attr(feature = "serde", serde(default))]
7194    pub mode: MavBatteryMode,
7195    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7196    #[cfg_attr(feature = "serde", serde(default))]
7197    pub fault_bitmask: MavBatteryFault,
7198}
7199impl BATTERY_STATUS_DATA {
7200    pub const ENCODED_LEN: usize = 54usize;
7201    pub const DEFAULT: Self = Self {
7202        current_consumed: 0_i32,
7203        energy_consumed: 0_i32,
7204        temperature: 0_i16,
7205        voltages: [0_u16; 10usize],
7206        current_battery: 0_i16,
7207        id: 0_u8,
7208        battery_function: MavBatteryFunction::DEFAULT,
7209        mavtype: MavBatteryType::DEFAULT,
7210        battery_remaining: 0_i8,
7211        time_remaining: 0_i32,
7212        charge_state: MavBatteryChargeState::DEFAULT,
7213        voltages_ext: [0_u16; 4usize],
7214        mode: MavBatteryMode::DEFAULT,
7215        fault_bitmask: MavBatteryFault::DEFAULT,
7216    };
7217    #[cfg(feature = "arbitrary")]
7218    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7219        use arbitrary::{Arbitrary, Unstructured};
7220        let mut buf = [0u8; 1024];
7221        rng.fill_bytes(&mut buf);
7222        let mut unstructured = Unstructured::new(&buf);
7223        Self::arbitrary(&mut unstructured).unwrap_or_default()
7224    }
7225}
7226impl Default for BATTERY_STATUS_DATA {
7227    fn default() -> Self {
7228        Self::DEFAULT.clone()
7229    }
7230}
7231impl MessageData for BATTERY_STATUS_DATA {
7232    type Message = MavMessage;
7233    const ID: u32 = 147u32;
7234    const NAME: &'static str = "BATTERY_STATUS";
7235    const EXTRA_CRC: u8 = 154u8;
7236    const ENCODED_LEN: usize = 54usize;
7237    fn deser(
7238        _version: MavlinkVersion,
7239        __input: &[u8],
7240    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7241        let avail_len = __input.len();
7242        let mut payload_buf = [0; Self::ENCODED_LEN];
7243        let mut buf = if avail_len < Self::ENCODED_LEN {
7244            payload_buf[0..avail_len].copy_from_slice(__input);
7245            Bytes::new(&payload_buf)
7246        } else {
7247            Bytes::new(__input)
7248        };
7249        let mut __struct = Self::default();
7250        __struct.current_consumed = buf.get_i32_le();
7251        __struct.energy_consumed = buf.get_i32_le();
7252        __struct.temperature = buf.get_i16_le();
7253        for v in &mut __struct.voltages {
7254            let val = buf.get_u16_le();
7255            *v = val;
7256        }
7257        __struct.current_battery = buf.get_i16_le();
7258        __struct.id = buf.get_u8();
7259        let tmp = buf.get_u8();
7260        __struct.battery_function =
7261            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7262                enum_type: "MavBatteryFunction",
7263                value: tmp as u32,
7264            })?;
7265        let tmp = buf.get_u8();
7266        __struct.mavtype =
7267            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7268                enum_type: "MavBatteryType",
7269                value: tmp as u32,
7270            })?;
7271        __struct.battery_remaining = buf.get_i8();
7272        __struct.time_remaining = buf.get_i32_le();
7273        let tmp = buf.get_u8();
7274        __struct.charge_state =
7275            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7276                enum_type: "MavBatteryChargeState",
7277                value: tmp as u32,
7278            })?;
7279        for v in &mut __struct.voltages_ext {
7280            let val = buf.get_u16_le();
7281            *v = val;
7282        }
7283        let tmp = buf.get_u8();
7284        __struct.mode =
7285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7286                enum_type: "MavBatteryMode",
7287                value: tmp as u32,
7288            })?;
7289        let tmp = buf.get_u32_le();
7290        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7291            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7292                flag_type: "MavBatteryFault",
7293                value: tmp as u32,
7294            })?;
7295        Ok(__struct)
7296    }
7297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7298        let mut __tmp = BytesMut::new(bytes);
7299        #[allow(clippy::absurd_extreme_comparisons)]
7300        #[allow(unused_comparisons)]
7301        if __tmp.remaining() < Self::ENCODED_LEN {
7302            panic!(
7303                "buffer is too small (need {} bytes, but got {})",
7304                Self::ENCODED_LEN,
7305                __tmp.remaining(),
7306            )
7307        }
7308        __tmp.put_i32_le(self.current_consumed);
7309        __tmp.put_i32_le(self.energy_consumed);
7310        __tmp.put_i16_le(self.temperature);
7311        for val in &self.voltages {
7312            __tmp.put_u16_le(*val);
7313        }
7314        __tmp.put_i16_le(self.current_battery);
7315        __tmp.put_u8(self.id);
7316        __tmp.put_u8(self.battery_function as u8);
7317        __tmp.put_u8(self.mavtype as u8);
7318        __tmp.put_i8(self.battery_remaining);
7319        if matches!(version, MavlinkVersion::V2) {
7320            __tmp.put_i32_le(self.time_remaining);
7321            __tmp.put_u8(self.charge_state as u8);
7322            for val in &self.voltages_ext {
7323                __tmp.put_u16_le(*val);
7324            }
7325            __tmp.put_u8(self.mode as u8);
7326            __tmp.put_u32_le(self.fault_bitmask.bits());
7327            let len = __tmp.len();
7328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7329        } else {
7330            __tmp.len()
7331        }
7332    }
7333}
7334#[doc = "Report button state change."]
7335#[doc = ""]
7336#[doc = "ID: 257"]
7337#[derive(Debug, Clone, PartialEq)]
7338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7340#[cfg_attr(feature = "ts", derive(TS))]
7341#[cfg_attr(feature = "ts", ts(export))]
7342pub struct BUTTON_CHANGE_DATA {
7343    #[doc = "Timestamp (time since system boot)."]
7344    pub time_boot_ms: u32,
7345    #[doc = "Time of last change of button state."]
7346    pub last_change_ms: u32,
7347    #[doc = "Bitmap for state of buttons."]
7348    pub state: u8,
7349}
7350impl BUTTON_CHANGE_DATA {
7351    pub const ENCODED_LEN: usize = 9usize;
7352    pub const DEFAULT: Self = Self {
7353        time_boot_ms: 0_u32,
7354        last_change_ms: 0_u32,
7355        state: 0_u8,
7356    };
7357    #[cfg(feature = "arbitrary")]
7358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7359        use arbitrary::{Arbitrary, Unstructured};
7360        let mut buf = [0u8; 1024];
7361        rng.fill_bytes(&mut buf);
7362        let mut unstructured = Unstructured::new(&buf);
7363        Self::arbitrary(&mut unstructured).unwrap_or_default()
7364    }
7365}
7366impl Default for BUTTON_CHANGE_DATA {
7367    fn default() -> Self {
7368        Self::DEFAULT.clone()
7369    }
7370}
7371impl MessageData for BUTTON_CHANGE_DATA {
7372    type Message = MavMessage;
7373    const ID: u32 = 257u32;
7374    const NAME: &'static str = "BUTTON_CHANGE";
7375    const EXTRA_CRC: u8 = 131u8;
7376    const ENCODED_LEN: usize = 9usize;
7377    fn deser(
7378        _version: MavlinkVersion,
7379        __input: &[u8],
7380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7381        let avail_len = __input.len();
7382        let mut payload_buf = [0; Self::ENCODED_LEN];
7383        let mut buf = if avail_len < Self::ENCODED_LEN {
7384            payload_buf[0..avail_len].copy_from_slice(__input);
7385            Bytes::new(&payload_buf)
7386        } else {
7387            Bytes::new(__input)
7388        };
7389        let mut __struct = Self::default();
7390        __struct.time_boot_ms = buf.get_u32_le();
7391        __struct.last_change_ms = buf.get_u32_le();
7392        __struct.state = buf.get_u8();
7393        Ok(__struct)
7394    }
7395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7396        let mut __tmp = BytesMut::new(bytes);
7397        #[allow(clippy::absurd_extreme_comparisons)]
7398        #[allow(unused_comparisons)]
7399        if __tmp.remaining() < Self::ENCODED_LEN {
7400            panic!(
7401                "buffer is too small (need {} bytes, but got {})",
7402                Self::ENCODED_LEN,
7403                __tmp.remaining(),
7404            )
7405        }
7406        __tmp.put_u32_le(self.time_boot_ms);
7407        __tmp.put_u32_le(self.last_change_ms);
7408        __tmp.put_u8(self.state);
7409        if matches!(version, MavlinkVersion::V2) {
7410            let len = __tmp.len();
7411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7412        } else {
7413            __tmp.len()
7414        }
7415    }
7416}
7417#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7418#[doc = ""]
7419#[doc = "ID: 262"]
7420#[derive(Debug, Clone, PartialEq)]
7421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7423#[cfg_attr(feature = "ts", derive(TS))]
7424#[cfg_attr(feature = "ts", ts(export))]
7425pub struct CAMERA_CAPTURE_STATUS_DATA {
7426    #[doc = "Timestamp (time since system boot)."]
7427    pub time_boot_ms: u32,
7428    #[doc = "Image capture interval"]
7429    pub image_interval: f32,
7430    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7431    pub recording_time_ms: u32,
7432    #[doc = "Available storage capacity."]
7433    pub available_capacity: f32,
7434    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7435    pub image_status: u8,
7436    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7437    pub video_status: u8,
7438    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7440    pub image_count: i32,
7441    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7443    pub camera_device_id: u8,
7444}
7445impl CAMERA_CAPTURE_STATUS_DATA {
7446    pub const ENCODED_LEN: usize = 23usize;
7447    pub const DEFAULT: Self = Self {
7448        time_boot_ms: 0_u32,
7449        image_interval: 0.0_f32,
7450        recording_time_ms: 0_u32,
7451        available_capacity: 0.0_f32,
7452        image_status: 0_u8,
7453        video_status: 0_u8,
7454        image_count: 0_i32,
7455        camera_device_id: 0_u8,
7456    };
7457    #[cfg(feature = "arbitrary")]
7458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7459        use arbitrary::{Arbitrary, Unstructured};
7460        let mut buf = [0u8; 1024];
7461        rng.fill_bytes(&mut buf);
7462        let mut unstructured = Unstructured::new(&buf);
7463        Self::arbitrary(&mut unstructured).unwrap_or_default()
7464    }
7465}
7466impl Default for CAMERA_CAPTURE_STATUS_DATA {
7467    fn default() -> Self {
7468        Self::DEFAULT.clone()
7469    }
7470}
7471impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7472    type Message = MavMessage;
7473    const ID: u32 = 262u32;
7474    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7475    const EXTRA_CRC: u8 = 12u8;
7476    const ENCODED_LEN: usize = 23usize;
7477    fn deser(
7478        _version: MavlinkVersion,
7479        __input: &[u8],
7480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7481        let avail_len = __input.len();
7482        let mut payload_buf = [0; Self::ENCODED_LEN];
7483        let mut buf = if avail_len < Self::ENCODED_LEN {
7484            payload_buf[0..avail_len].copy_from_slice(__input);
7485            Bytes::new(&payload_buf)
7486        } else {
7487            Bytes::new(__input)
7488        };
7489        let mut __struct = Self::default();
7490        __struct.time_boot_ms = buf.get_u32_le();
7491        __struct.image_interval = buf.get_f32_le();
7492        __struct.recording_time_ms = buf.get_u32_le();
7493        __struct.available_capacity = buf.get_f32_le();
7494        __struct.image_status = buf.get_u8();
7495        __struct.video_status = buf.get_u8();
7496        __struct.image_count = buf.get_i32_le();
7497        __struct.camera_device_id = buf.get_u8();
7498        Ok(__struct)
7499    }
7500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7501        let mut __tmp = BytesMut::new(bytes);
7502        #[allow(clippy::absurd_extreme_comparisons)]
7503        #[allow(unused_comparisons)]
7504        if __tmp.remaining() < Self::ENCODED_LEN {
7505            panic!(
7506                "buffer is too small (need {} bytes, but got {})",
7507                Self::ENCODED_LEN,
7508                __tmp.remaining(),
7509            )
7510        }
7511        __tmp.put_u32_le(self.time_boot_ms);
7512        __tmp.put_f32_le(self.image_interval);
7513        __tmp.put_u32_le(self.recording_time_ms);
7514        __tmp.put_f32_le(self.available_capacity);
7515        __tmp.put_u8(self.image_status);
7516        __tmp.put_u8(self.video_status);
7517        if matches!(version, MavlinkVersion::V2) {
7518            __tmp.put_i32_le(self.image_count);
7519            __tmp.put_u8(self.camera_device_id);
7520            let len = __tmp.len();
7521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7522        } else {
7523            __tmp.len()
7524        }
7525    }
7526}
7527#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7528#[doc = ""]
7529#[doc = "ID: 271"]
7530#[derive(Debug, Clone, PartialEq)]
7531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7533#[cfg_attr(feature = "ts", derive(TS))]
7534#[cfg_attr(feature = "ts", ts(export))]
7535pub struct CAMERA_FOV_STATUS_DATA {
7536    #[doc = "Timestamp (time since system boot)."]
7537    pub time_boot_ms: u32,
7538    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7539    pub lat_camera: i32,
7540    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7541    pub lon_camera: i32,
7542    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7543    pub alt_camera: i32,
7544    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7545    pub lat_image: i32,
7546    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7547    pub lon_image: i32,
7548    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7549    pub alt_image: i32,
7550    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7551    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7552    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7553    pub q: [f32; 4],
7554    #[doc = "Horizontal field of view (NaN if unknown)."]
7555    pub hfov: f32,
7556    #[doc = "Vertical field of view (NaN if unknown)."]
7557    pub vfov: f32,
7558    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7559    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7560    pub camera_device_id: u8,
7561}
7562impl CAMERA_FOV_STATUS_DATA {
7563    pub const ENCODED_LEN: usize = 53usize;
7564    pub const DEFAULT: Self = Self {
7565        time_boot_ms: 0_u32,
7566        lat_camera: 0_i32,
7567        lon_camera: 0_i32,
7568        alt_camera: 0_i32,
7569        lat_image: 0_i32,
7570        lon_image: 0_i32,
7571        alt_image: 0_i32,
7572        q: [0.0_f32; 4usize],
7573        hfov: 0.0_f32,
7574        vfov: 0.0_f32,
7575        camera_device_id: 0_u8,
7576    };
7577    #[cfg(feature = "arbitrary")]
7578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7579        use arbitrary::{Arbitrary, Unstructured};
7580        let mut buf = [0u8; 1024];
7581        rng.fill_bytes(&mut buf);
7582        let mut unstructured = Unstructured::new(&buf);
7583        Self::arbitrary(&mut unstructured).unwrap_or_default()
7584    }
7585}
7586impl Default for CAMERA_FOV_STATUS_DATA {
7587    fn default() -> Self {
7588        Self::DEFAULT.clone()
7589    }
7590}
7591impl MessageData for CAMERA_FOV_STATUS_DATA {
7592    type Message = MavMessage;
7593    const ID: u32 = 271u32;
7594    const NAME: &'static str = "CAMERA_FOV_STATUS";
7595    const EXTRA_CRC: u8 = 22u8;
7596    const ENCODED_LEN: usize = 53usize;
7597    fn deser(
7598        _version: MavlinkVersion,
7599        __input: &[u8],
7600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7601        let avail_len = __input.len();
7602        let mut payload_buf = [0; Self::ENCODED_LEN];
7603        let mut buf = if avail_len < Self::ENCODED_LEN {
7604            payload_buf[0..avail_len].copy_from_slice(__input);
7605            Bytes::new(&payload_buf)
7606        } else {
7607            Bytes::new(__input)
7608        };
7609        let mut __struct = Self::default();
7610        __struct.time_boot_ms = buf.get_u32_le();
7611        __struct.lat_camera = buf.get_i32_le();
7612        __struct.lon_camera = buf.get_i32_le();
7613        __struct.alt_camera = buf.get_i32_le();
7614        __struct.lat_image = buf.get_i32_le();
7615        __struct.lon_image = buf.get_i32_le();
7616        __struct.alt_image = buf.get_i32_le();
7617        for v in &mut __struct.q {
7618            let val = buf.get_f32_le();
7619            *v = val;
7620        }
7621        __struct.hfov = buf.get_f32_le();
7622        __struct.vfov = buf.get_f32_le();
7623        __struct.camera_device_id = buf.get_u8();
7624        Ok(__struct)
7625    }
7626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7627        let mut __tmp = BytesMut::new(bytes);
7628        #[allow(clippy::absurd_extreme_comparisons)]
7629        #[allow(unused_comparisons)]
7630        if __tmp.remaining() < Self::ENCODED_LEN {
7631            panic!(
7632                "buffer is too small (need {} bytes, but got {})",
7633                Self::ENCODED_LEN,
7634                __tmp.remaining(),
7635            )
7636        }
7637        __tmp.put_u32_le(self.time_boot_ms);
7638        __tmp.put_i32_le(self.lat_camera);
7639        __tmp.put_i32_le(self.lon_camera);
7640        __tmp.put_i32_le(self.alt_camera);
7641        __tmp.put_i32_le(self.lat_image);
7642        __tmp.put_i32_le(self.lon_image);
7643        __tmp.put_i32_le(self.alt_image);
7644        for val in &self.q {
7645            __tmp.put_f32_le(*val);
7646        }
7647        __tmp.put_f32_le(self.hfov);
7648        __tmp.put_f32_le(self.vfov);
7649        if matches!(version, MavlinkVersion::V2) {
7650            __tmp.put_u8(self.camera_device_id);
7651            let len = __tmp.len();
7652            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7653        } else {
7654            __tmp.len()
7655        }
7656    }
7657}
7658#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7659#[doc = ""]
7660#[doc = "ID: 263"]
7661#[derive(Debug, Clone, PartialEq)]
7662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7664#[cfg_attr(feature = "ts", derive(TS))]
7665#[cfg_attr(feature = "ts", ts(export))]
7666pub struct CAMERA_IMAGE_CAPTURED_DATA {
7667    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7668    pub time_utc: u64,
7669    #[doc = "Timestamp (time since system boot)."]
7670    pub time_boot_ms: u32,
7671    #[doc = "Latitude where image was taken"]
7672    pub lat: i32,
7673    #[doc = "Longitude where capture was taken"]
7674    pub lon: i32,
7675    #[doc = "Altitude (MSL) where image was taken"]
7676    pub alt: i32,
7677    #[doc = "Altitude above ground"]
7678    pub relative_alt: i32,
7679    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7682    pub q: [f32; 4],
7683    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7684    pub image_index: i32,
7685    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7686    pub camera_id: u8,
7687    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7688    pub capture_result: i8,
7689    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7690    #[cfg_attr(feature = "ts", ts(type = "string"))]
7691    pub file_url: CharArray<205>,
7692}
7693impl CAMERA_IMAGE_CAPTURED_DATA {
7694    pub const ENCODED_LEN: usize = 255usize;
7695    pub const DEFAULT: Self = Self {
7696        time_utc: 0_u64,
7697        time_boot_ms: 0_u32,
7698        lat: 0_i32,
7699        lon: 0_i32,
7700        alt: 0_i32,
7701        relative_alt: 0_i32,
7702        q: [0.0_f32; 4usize],
7703        image_index: 0_i32,
7704        camera_id: 0_u8,
7705        capture_result: 0_i8,
7706        file_url: CharArray::new([0_u8; 205usize]),
7707    };
7708    #[cfg(feature = "arbitrary")]
7709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7710        use arbitrary::{Arbitrary, Unstructured};
7711        let mut buf = [0u8; 1024];
7712        rng.fill_bytes(&mut buf);
7713        let mut unstructured = Unstructured::new(&buf);
7714        Self::arbitrary(&mut unstructured).unwrap_or_default()
7715    }
7716}
7717impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7718    fn default() -> Self {
7719        Self::DEFAULT.clone()
7720    }
7721}
7722impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7723    type Message = MavMessage;
7724    const ID: u32 = 263u32;
7725    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7726    const EXTRA_CRC: u8 = 133u8;
7727    const ENCODED_LEN: usize = 255usize;
7728    fn deser(
7729        _version: MavlinkVersion,
7730        __input: &[u8],
7731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7732        let avail_len = __input.len();
7733        let mut payload_buf = [0; Self::ENCODED_LEN];
7734        let mut buf = if avail_len < Self::ENCODED_LEN {
7735            payload_buf[0..avail_len].copy_from_slice(__input);
7736            Bytes::new(&payload_buf)
7737        } else {
7738            Bytes::new(__input)
7739        };
7740        let mut __struct = Self::default();
7741        __struct.time_utc = buf.get_u64_le();
7742        __struct.time_boot_ms = buf.get_u32_le();
7743        __struct.lat = buf.get_i32_le();
7744        __struct.lon = buf.get_i32_le();
7745        __struct.alt = buf.get_i32_le();
7746        __struct.relative_alt = buf.get_i32_le();
7747        for v in &mut __struct.q {
7748            let val = buf.get_f32_le();
7749            *v = val;
7750        }
7751        __struct.image_index = buf.get_i32_le();
7752        __struct.camera_id = buf.get_u8();
7753        __struct.capture_result = buf.get_i8();
7754        let mut tmp = [0_u8; 205usize];
7755        for v in &mut tmp {
7756            *v = buf.get_u8();
7757        }
7758        __struct.file_url = CharArray::new(tmp);
7759        Ok(__struct)
7760    }
7761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7762        let mut __tmp = BytesMut::new(bytes);
7763        #[allow(clippy::absurd_extreme_comparisons)]
7764        #[allow(unused_comparisons)]
7765        if __tmp.remaining() < Self::ENCODED_LEN {
7766            panic!(
7767                "buffer is too small (need {} bytes, but got {})",
7768                Self::ENCODED_LEN,
7769                __tmp.remaining(),
7770            )
7771        }
7772        __tmp.put_u64_le(self.time_utc);
7773        __tmp.put_u32_le(self.time_boot_ms);
7774        __tmp.put_i32_le(self.lat);
7775        __tmp.put_i32_le(self.lon);
7776        __tmp.put_i32_le(self.alt);
7777        __tmp.put_i32_le(self.relative_alt);
7778        for val in &self.q {
7779            __tmp.put_f32_le(*val);
7780        }
7781        __tmp.put_i32_le(self.image_index);
7782        __tmp.put_u8(self.camera_id);
7783        __tmp.put_i8(self.capture_result);
7784        for val in &self.file_url {
7785            __tmp.put_u8(*val);
7786        }
7787        if matches!(version, MavlinkVersion::V2) {
7788            let len = __tmp.len();
7789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7790        } else {
7791            __tmp.len()
7792        }
7793    }
7794}
7795#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7796#[doc = ""]
7797#[doc = "ID: 259"]
7798#[derive(Debug, Clone, PartialEq)]
7799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7801#[cfg_attr(feature = "ts", derive(TS))]
7802#[cfg_attr(feature = "ts", ts(export))]
7803pub struct CAMERA_INFORMATION_DATA {
7804    #[doc = "Timestamp (time since system boot)."]
7805    pub time_boot_ms: u32,
7806    #[doc = "0xff). Use 0 if not known."]
7807    pub firmware_version: u32,
7808    #[doc = "Focal length. Use NaN if not known."]
7809    pub focal_length: f32,
7810    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7811    pub sensor_size_h: f32,
7812    #[doc = "Image sensor size vertical. Use NaN if not known."]
7813    pub sensor_size_v: f32,
7814    #[doc = "Bitmap of camera capability flags."]
7815    pub flags: CameraCapFlags,
7816    #[doc = "Horizontal image resolution. Use 0 if not known."]
7817    pub resolution_h: u16,
7818    #[doc = "Vertical image resolution. Use 0 if not known."]
7819    pub resolution_v: u16,
7820    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7821    pub cam_definition_version: u16,
7822    #[doc = "Name of the camera vendor"]
7823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7824    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7825    pub vendor_name: [u8; 32],
7826    #[doc = "Name of the camera model"]
7827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7829    pub model_name: [u8; 32],
7830    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7831    pub lens_id: u8,
7832    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7833    #[cfg_attr(feature = "ts", ts(type = "string"))]
7834    pub cam_definition_uri: CharArray<140>,
7835    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7836    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7837    pub gimbal_device_id: u8,
7838    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7839    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7840    pub camera_device_id: u8,
7841}
7842impl CAMERA_INFORMATION_DATA {
7843    pub const ENCODED_LEN: usize = 237usize;
7844    pub const DEFAULT: Self = Self {
7845        time_boot_ms: 0_u32,
7846        firmware_version: 0_u32,
7847        focal_length: 0.0_f32,
7848        sensor_size_h: 0.0_f32,
7849        sensor_size_v: 0.0_f32,
7850        flags: CameraCapFlags::DEFAULT,
7851        resolution_h: 0_u16,
7852        resolution_v: 0_u16,
7853        cam_definition_version: 0_u16,
7854        vendor_name: [0_u8; 32usize],
7855        model_name: [0_u8; 32usize],
7856        lens_id: 0_u8,
7857        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7858        gimbal_device_id: 0_u8,
7859        camera_device_id: 0_u8,
7860    };
7861    #[cfg(feature = "arbitrary")]
7862    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7863        use arbitrary::{Arbitrary, Unstructured};
7864        let mut buf = [0u8; 1024];
7865        rng.fill_bytes(&mut buf);
7866        let mut unstructured = Unstructured::new(&buf);
7867        Self::arbitrary(&mut unstructured).unwrap_or_default()
7868    }
7869}
7870impl Default for CAMERA_INFORMATION_DATA {
7871    fn default() -> Self {
7872        Self::DEFAULT.clone()
7873    }
7874}
7875impl MessageData for CAMERA_INFORMATION_DATA {
7876    type Message = MavMessage;
7877    const ID: u32 = 259u32;
7878    const NAME: &'static str = "CAMERA_INFORMATION";
7879    const EXTRA_CRC: u8 = 92u8;
7880    const ENCODED_LEN: usize = 237usize;
7881    fn deser(
7882        _version: MavlinkVersion,
7883        __input: &[u8],
7884    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7885        let avail_len = __input.len();
7886        let mut payload_buf = [0; Self::ENCODED_LEN];
7887        let mut buf = if avail_len < Self::ENCODED_LEN {
7888            payload_buf[0..avail_len].copy_from_slice(__input);
7889            Bytes::new(&payload_buf)
7890        } else {
7891            Bytes::new(__input)
7892        };
7893        let mut __struct = Self::default();
7894        __struct.time_boot_ms = buf.get_u32_le();
7895        __struct.firmware_version = buf.get_u32_le();
7896        __struct.focal_length = buf.get_f32_le();
7897        __struct.sensor_size_h = buf.get_f32_le();
7898        __struct.sensor_size_v = buf.get_f32_le();
7899        let tmp = buf.get_u32_le();
7900        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7901            ::mavlink_core::error::ParserError::InvalidFlag {
7902                flag_type: "CameraCapFlags",
7903                value: tmp as u32,
7904            },
7905        )?;
7906        __struct.resolution_h = buf.get_u16_le();
7907        __struct.resolution_v = buf.get_u16_le();
7908        __struct.cam_definition_version = buf.get_u16_le();
7909        for v in &mut __struct.vendor_name {
7910            let val = buf.get_u8();
7911            *v = val;
7912        }
7913        for v in &mut __struct.model_name {
7914            let val = buf.get_u8();
7915            *v = val;
7916        }
7917        __struct.lens_id = buf.get_u8();
7918        let mut tmp = [0_u8; 140usize];
7919        for v in &mut tmp {
7920            *v = buf.get_u8();
7921        }
7922        __struct.cam_definition_uri = CharArray::new(tmp);
7923        __struct.gimbal_device_id = buf.get_u8();
7924        __struct.camera_device_id = buf.get_u8();
7925        Ok(__struct)
7926    }
7927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7928        let mut __tmp = BytesMut::new(bytes);
7929        #[allow(clippy::absurd_extreme_comparisons)]
7930        #[allow(unused_comparisons)]
7931        if __tmp.remaining() < Self::ENCODED_LEN {
7932            panic!(
7933                "buffer is too small (need {} bytes, but got {})",
7934                Self::ENCODED_LEN,
7935                __tmp.remaining(),
7936            )
7937        }
7938        __tmp.put_u32_le(self.time_boot_ms);
7939        __tmp.put_u32_le(self.firmware_version);
7940        __tmp.put_f32_le(self.focal_length);
7941        __tmp.put_f32_le(self.sensor_size_h);
7942        __tmp.put_f32_le(self.sensor_size_v);
7943        __tmp.put_u32_le(self.flags.bits());
7944        __tmp.put_u16_le(self.resolution_h);
7945        __tmp.put_u16_le(self.resolution_v);
7946        __tmp.put_u16_le(self.cam_definition_version);
7947        for val in &self.vendor_name {
7948            __tmp.put_u8(*val);
7949        }
7950        for val in &self.model_name {
7951            __tmp.put_u8(*val);
7952        }
7953        __tmp.put_u8(self.lens_id);
7954        for val in &self.cam_definition_uri {
7955            __tmp.put_u8(*val);
7956        }
7957        if matches!(version, MavlinkVersion::V2) {
7958            __tmp.put_u8(self.gimbal_device_id);
7959            __tmp.put_u8(self.camera_device_id);
7960            let len = __tmp.len();
7961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7962        } else {
7963            __tmp.len()
7964        }
7965    }
7966}
7967#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7968#[doc = ""]
7969#[doc = "ID: 260"]
7970#[derive(Debug, Clone, PartialEq)]
7971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7973#[cfg_attr(feature = "ts", derive(TS))]
7974#[cfg_attr(feature = "ts", ts(export))]
7975pub struct CAMERA_SETTINGS_DATA {
7976    #[doc = "Timestamp (time since system boot)."]
7977    pub time_boot_ms: u32,
7978    #[doc = "Camera mode"]
7979    pub mode_id: CameraMode,
7980    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7982    pub zoomLevel: f32,
7983    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7985    pub focusLevel: f32,
7986    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7988    pub camera_device_id: u8,
7989}
7990impl CAMERA_SETTINGS_DATA {
7991    pub const ENCODED_LEN: usize = 14usize;
7992    pub const DEFAULT: Self = Self {
7993        time_boot_ms: 0_u32,
7994        mode_id: CameraMode::DEFAULT,
7995        zoomLevel: 0.0_f32,
7996        focusLevel: 0.0_f32,
7997        camera_device_id: 0_u8,
7998    };
7999    #[cfg(feature = "arbitrary")]
8000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8001        use arbitrary::{Arbitrary, Unstructured};
8002        let mut buf = [0u8; 1024];
8003        rng.fill_bytes(&mut buf);
8004        let mut unstructured = Unstructured::new(&buf);
8005        Self::arbitrary(&mut unstructured).unwrap_or_default()
8006    }
8007}
8008impl Default for CAMERA_SETTINGS_DATA {
8009    fn default() -> Self {
8010        Self::DEFAULT.clone()
8011    }
8012}
8013impl MessageData for CAMERA_SETTINGS_DATA {
8014    type Message = MavMessage;
8015    const ID: u32 = 260u32;
8016    const NAME: &'static str = "CAMERA_SETTINGS";
8017    const EXTRA_CRC: u8 = 146u8;
8018    const ENCODED_LEN: usize = 14usize;
8019    fn deser(
8020        _version: MavlinkVersion,
8021        __input: &[u8],
8022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8023        let avail_len = __input.len();
8024        let mut payload_buf = [0; Self::ENCODED_LEN];
8025        let mut buf = if avail_len < Self::ENCODED_LEN {
8026            payload_buf[0..avail_len].copy_from_slice(__input);
8027            Bytes::new(&payload_buf)
8028        } else {
8029            Bytes::new(__input)
8030        };
8031        let mut __struct = Self::default();
8032        __struct.time_boot_ms = buf.get_u32_le();
8033        let tmp = buf.get_u8();
8034        __struct.mode_id =
8035            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8036                enum_type: "CameraMode",
8037                value: tmp as u32,
8038            })?;
8039        __struct.zoomLevel = buf.get_f32_le();
8040        __struct.focusLevel = buf.get_f32_le();
8041        __struct.camera_device_id = buf.get_u8();
8042        Ok(__struct)
8043    }
8044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8045        let mut __tmp = BytesMut::new(bytes);
8046        #[allow(clippy::absurd_extreme_comparisons)]
8047        #[allow(unused_comparisons)]
8048        if __tmp.remaining() < Self::ENCODED_LEN {
8049            panic!(
8050                "buffer is too small (need {} bytes, but got {})",
8051                Self::ENCODED_LEN,
8052                __tmp.remaining(),
8053            )
8054        }
8055        __tmp.put_u32_le(self.time_boot_ms);
8056        __tmp.put_u8(self.mode_id as u8);
8057        if matches!(version, MavlinkVersion::V2) {
8058            __tmp.put_f32_le(self.zoomLevel);
8059            __tmp.put_f32_le(self.focusLevel);
8060            __tmp.put_u8(self.camera_device_id);
8061            let len = __tmp.len();
8062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8063        } else {
8064            __tmp.len()
8065        }
8066    }
8067}
8068#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8069#[doc = ""]
8070#[doc = "ID: 277"]
8071#[derive(Debug, Clone, PartialEq)]
8072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8074#[cfg_attr(feature = "ts", derive(TS))]
8075#[cfg_attr(feature = "ts", ts(export))]
8076pub struct CAMERA_THERMAL_RANGE_DATA {
8077    #[doc = "Timestamp (time since system boot)."]
8078    pub time_boot_ms: u32,
8079    #[doc = "Temperature max."]
8080    pub max: f32,
8081    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8082    pub max_point_x: f32,
8083    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8084    pub max_point_y: f32,
8085    #[doc = "Temperature min."]
8086    pub min: f32,
8087    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8088    pub min_point_x: f32,
8089    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8090    pub min_point_y: f32,
8091    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8092    pub stream_id: u8,
8093    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8094    pub camera_device_id: u8,
8095}
8096impl CAMERA_THERMAL_RANGE_DATA {
8097    pub const ENCODED_LEN: usize = 30usize;
8098    pub const DEFAULT: Self = Self {
8099        time_boot_ms: 0_u32,
8100        max: 0.0_f32,
8101        max_point_x: 0.0_f32,
8102        max_point_y: 0.0_f32,
8103        min: 0.0_f32,
8104        min_point_x: 0.0_f32,
8105        min_point_y: 0.0_f32,
8106        stream_id: 0_u8,
8107        camera_device_id: 0_u8,
8108    };
8109    #[cfg(feature = "arbitrary")]
8110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8111        use arbitrary::{Arbitrary, Unstructured};
8112        let mut buf = [0u8; 1024];
8113        rng.fill_bytes(&mut buf);
8114        let mut unstructured = Unstructured::new(&buf);
8115        Self::arbitrary(&mut unstructured).unwrap_or_default()
8116    }
8117}
8118impl Default for CAMERA_THERMAL_RANGE_DATA {
8119    fn default() -> Self {
8120        Self::DEFAULT.clone()
8121    }
8122}
8123impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8124    type Message = MavMessage;
8125    const ID: u32 = 277u32;
8126    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8127    const EXTRA_CRC: u8 = 62u8;
8128    const ENCODED_LEN: usize = 30usize;
8129    fn deser(
8130        _version: MavlinkVersion,
8131        __input: &[u8],
8132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8133        let avail_len = __input.len();
8134        let mut payload_buf = [0; Self::ENCODED_LEN];
8135        let mut buf = if avail_len < Self::ENCODED_LEN {
8136            payload_buf[0..avail_len].copy_from_slice(__input);
8137            Bytes::new(&payload_buf)
8138        } else {
8139            Bytes::new(__input)
8140        };
8141        let mut __struct = Self::default();
8142        __struct.time_boot_ms = buf.get_u32_le();
8143        __struct.max = buf.get_f32_le();
8144        __struct.max_point_x = buf.get_f32_le();
8145        __struct.max_point_y = buf.get_f32_le();
8146        __struct.min = buf.get_f32_le();
8147        __struct.min_point_x = buf.get_f32_le();
8148        __struct.min_point_y = buf.get_f32_le();
8149        __struct.stream_id = buf.get_u8();
8150        __struct.camera_device_id = buf.get_u8();
8151        Ok(__struct)
8152    }
8153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8154        let mut __tmp = BytesMut::new(bytes);
8155        #[allow(clippy::absurd_extreme_comparisons)]
8156        #[allow(unused_comparisons)]
8157        if __tmp.remaining() < Self::ENCODED_LEN {
8158            panic!(
8159                "buffer is too small (need {} bytes, but got {})",
8160                Self::ENCODED_LEN,
8161                __tmp.remaining(),
8162            )
8163        }
8164        __tmp.put_u32_le(self.time_boot_ms);
8165        __tmp.put_f32_le(self.max);
8166        __tmp.put_f32_le(self.max_point_x);
8167        __tmp.put_f32_le(self.max_point_y);
8168        __tmp.put_f32_le(self.min);
8169        __tmp.put_f32_le(self.min_point_x);
8170        __tmp.put_f32_le(self.min_point_y);
8171        __tmp.put_u8(self.stream_id);
8172        __tmp.put_u8(self.camera_device_id);
8173        if matches!(version, MavlinkVersion::V2) {
8174            let len = __tmp.len();
8175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8176        } else {
8177            __tmp.len()
8178        }
8179    }
8180}
8181#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8182#[doc = ""]
8183#[doc = "ID: 276"]
8184#[derive(Debug, Clone, PartialEq)]
8185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8187#[cfg_attr(feature = "ts", derive(TS))]
8188#[cfg_attr(feature = "ts", ts(export))]
8189pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8190    #[doc = "Latitude of tracked object"]
8191    pub lat: i32,
8192    #[doc = "Longitude of tracked object"]
8193    pub lon: i32,
8194    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8195    pub alt: f32,
8196    #[doc = "Horizontal accuracy. NAN if unknown"]
8197    pub h_acc: f32,
8198    #[doc = "Vertical accuracy. NAN if unknown"]
8199    pub v_acc: f32,
8200    #[doc = "North velocity of tracked object. NAN if unknown"]
8201    pub vel_n: f32,
8202    #[doc = "East velocity of tracked object. NAN if unknown"]
8203    pub vel_e: f32,
8204    #[doc = "Down velocity of tracked object. NAN if unknown"]
8205    pub vel_d: f32,
8206    #[doc = "Velocity accuracy. NAN if unknown"]
8207    pub vel_acc: f32,
8208    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8209    pub dist: f32,
8210    #[doc = "Heading in radians, in NED. NAN if unknown"]
8211    pub hdg: f32,
8212    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8213    pub hdg_acc: f32,
8214    #[doc = "Current tracking status"]
8215    pub tracking_status: CameraTrackingStatusFlags,
8216    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8217    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8218    pub camera_device_id: u8,
8219}
8220impl CAMERA_TRACKING_GEO_STATUS_DATA {
8221    pub const ENCODED_LEN: usize = 50usize;
8222    pub const DEFAULT: Self = Self {
8223        lat: 0_i32,
8224        lon: 0_i32,
8225        alt: 0.0_f32,
8226        h_acc: 0.0_f32,
8227        v_acc: 0.0_f32,
8228        vel_n: 0.0_f32,
8229        vel_e: 0.0_f32,
8230        vel_d: 0.0_f32,
8231        vel_acc: 0.0_f32,
8232        dist: 0.0_f32,
8233        hdg: 0.0_f32,
8234        hdg_acc: 0.0_f32,
8235        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8236        camera_device_id: 0_u8,
8237    };
8238    #[cfg(feature = "arbitrary")]
8239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8240        use arbitrary::{Arbitrary, Unstructured};
8241        let mut buf = [0u8; 1024];
8242        rng.fill_bytes(&mut buf);
8243        let mut unstructured = Unstructured::new(&buf);
8244        Self::arbitrary(&mut unstructured).unwrap_or_default()
8245    }
8246}
8247impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8248    fn default() -> Self {
8249        Self::DEFAULT.clone()
8250    }
8251}
8252impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8253    type Message = MavMessage;
8254    const ID: u32 = 276u32;
8255    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8256    const EXTRA_CRC: u8 = 18u8;
8257    const ENCODED_LEN: usize = 50usize;
8258    fn deser(
8259        _version: MavlinkVersion,
8260        __input: &[u8],
8261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8262        let avail_len = __input.len();
8263        let mut payload_buf = [0; Self::ENCODED_LEN];
8264        let mut buf = if avail_len < Self::ENCODED_LEN {
8265            payload_buf[0..avail_len].copy_from_slice(__input);
8266            Bytes::new(&payload_buf)
8267        } else {
8268            Bytes::new(__input)
8269        };
8270        let mut __struct = Self::default();
8271        __struct.lat = buf.get_i32_le();
8272        __struct.lon = buf.get_i32_le();
8273        __struct.alt = buf.get_f32_le();
8274        __struct.h_acc = buf.get_f32_le();
8275        __struct.v_acc = buf.get_f32_le();
8276        __struct.vel_n = buf.get_f32_le();
8277        __struct.vel_e = buf.get_f32_le();
8278        __struct.vel_d = buf.get_f32_le();
8279        __struct.vel_acc = buf.get_f32_le();
8280        __struct.dist = buf.get_f32_le();
8281        __struct.hdg = buf.get_f32_le();
8282        __struct.hdg_acc = buf.get_f32_le();
8283        let tmp = buf.get_u8();
8284        __struct.tracking_status =
8285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8286                enum_type: "CameraTrackingStatusFlags",
8287                value: tmp as u32,
8288            })?;
8289        __struct.camera_device_id = buf.get_u8();
8290        Ok(__struct)
8291    }
8292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8293        let mut __tmp = BytesMut::new(bytes);
8294        #[allow(clippy::absurd_extreme_comparisons)]
8295        #[allow(unused_comparisons)]
8296        if __tmp.remaining() < Self::ENCODED_LEN {
8297            panic!(
8298                "buffer is too small (need {} bytes, but got {})",
8299                Self::ENCODED_LEN,
8300                __tmp.remaining(),
8301            )
8302        }
8303        __tmp.put_i32_le(self.lat);
8304        __tmp.put_i32_le(self.lon);
8305        __tmp.put_f32_le(self.alt);
8306        __tmp.put_f32_le(self.h_acc);
8307        __tmp.put_f32_le(self.v_acc);
8308        __tmp.put_f32_le(self.vel_n);
8309        __tmp.put_f32_le(self.vel_e);
8310        __tmp.put_f32_le(self.vel_d);
8311        __tmp.put_f32_le(self.vel_acc);
8312        __tmp.put_f32_le(self.dist);
8313        __tmp.put_f32_le(self.hdg);
8314        __tmp.put_f32_le(self.hdg_acc);
8315        __tmp.put_u8(self.tracking_status as u8);
8316        if matches!(version, MavlinkVersion::V2) {
8317            __tmp.put_u8(self.camera_device_id);
8318            let len = __tmp.len();
8319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8320        } else {
8321            __tmp.len()
8322        }
8323    }
8324}
8325#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8326#[doc = ""]
8327#[doc = "ID: 275"]
8328#[derive(Debug, Clone, PartialEq)]
8329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8331#[cfg_attr(feature = "ts", derive(TS))]
8332#[cfg_attr(feature = "ts", ts(export))]
8333pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8334    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8335    pub point_x: f32,
8336    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8337    pub point_y: f32,
8338    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8339    pub radius: f32,
8340    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8341    pub rec_top_x: f32,
8342    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8343    pub rec_top_y: f32,
8344    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8345    pub rec_bottom_x: f32,
8346    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8347    pub rec_bottom_y: f32,
8348    #[doc = "Current tracking status"]
8349    pub tracking_status: CameraTrackingStatusFlags,
8350    #[doc = "Current tracking mode"]
8351    pub tracking_mode: CameraTrackingMode,
8352    #[doc = "Defines location of target data"]
8353    pub target_data: CameraTrackingTargetData,
8354    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8356    pub camera_device_id: u8,
8357}
8358impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8359    pub const ENCODED_LEN: usize = 32usize;
8360    pub const DEFAULT: Self = Self {
8361        point_x: 0.0_f32,
8362        point_y: 0.0_f32,
8363        radius: 0.0_f32,
8364        rec_top_x: 0.0_f32,
8365        rec_top_y: 0.0_f32,
8366        rec_bottom_x: 0.0_f32,
8367        rec_bottom_y: 0.0_f32,
8368        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8369        tracking_mode: CameraTrackingMode::DEFAULT,
8370        target_data: CameraTrackingTargetData::DEFAULT,
8371        camera_device_id: 0_u8,
8372    };
8373    #[cfg(feature = "arbitrary")]
8374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8375        use arbitrary::{Arbitrary, Unstructured};
8376        let mut buf = [0u8; 1024];
8377        rng.fill_bytes(&mut buf);
8378        let mut unstructured = Unstructured::new(&buf);
8379        Self::arbitrary(&mut unstructured).unwrap_or_default()
8380    }
8381}
8382impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8383    fn default() -> Self {
8384        Self::DEFAULT.clone()
8385    }
8386}
8387impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8388    type Message = MavMessage;
8389    const ID: u32 = 275u32;
8390    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8391    const EXTRA_CRC: u8 = 126u8;
8392    const ENCODED_LEN: usize = 32usize;
8393    fn deser(
8394        _version: MavlinkVersion,
8395        __input: &[u8],
8396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8397        let avail_len = __input.len();
8398        let mut payload_buf = [0; Self::ENCODED_LEN];
8399        let mut buf = if avail_len < Self::ENCODED_LEN {
8400            payload_buf[0..avail_len].copy_from_slice(__input);
8401            Bytes::new(&payload_buf)
8402        } else {
8403            Bytes::new(__input)
8404        };
8405        let mut __struct = Self::default();
8406        __struct.point_x = buf.get_f32_le();
8407        __struct.point_y = buf.get_f32_le();
8408        __struct.radius = buf.get_f32_le();
8409        __struct.rec_top_x = buf.get_f32_le();
8410        __struct.rec_top_y = buf.get_f32_le();
8411        __struct.rec_bottom_x = buf.get_f32_le();
8412        __struct.rec_bottom_y = buf.get_f32_le();
8413        let tmp = buf.get_u8();
8414        __struct.tracking_status =
8415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8416                enum_type: "CameraTrackingStatusFlags",
8417                value: tmp as u32,
8418            })?;
8419        let tmp = buf.get_u8();
8420        __struct.tracking_mode =
8421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8422                enum_type: "CameraTrackingMode",
8423                value: tmp as u32,
8424            })?;
8425        let tmp = buf.get_u8();
8426        __struct.target_data =
8427            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8428                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8429                    flag_type: "CameraTrackingTargetData",
8430                    value: tmp as u32,
8431                })?;
8432        __struct.camera_device_id = buf.get_u8();
8433        Ok(__struct)
8434    }
8435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8436        let mut __tmp = BytesMut::new(bytes);
8437        #[allow(clippy::absurd_extreme_comparisons)]
8438        #[allow(unused_comparisons)]
8439        if __tmp.remaining() < Self::ENCODED_LEN {
8440            panic!(
8441                "buffer is too small (need {} bytes, but got {})",
8442                Self::ENCODED_LEN,
8443                __tmp.remaining(),
8444            )
8445        }
8446        __tmp.put_f32_le(self.point_x);
8447        __tmp.put_f32_le(self.point_y);
8448        __tmp.put_f32_le(self.radius);
8449        __tmp.put_f32_le(self.rec_top_x);
8450        __tmp.put_f32_le(self.rec_top_y);
8451        __tmp.put_f32_le(self.rec_bottom_x);
8452        __tmp.put_f32_le(self.rec_bottom_y);
8453        __tmp.put_u8(self.tracking_status as u8);
8454        __tmp.put_u8(self.tracking_mode as u8);
8455        __tmp.put_u8(self.target_data.bits());
8456        if matches!(version, MavlinkVersion::V2) {
8457            __tmp.put_u8(self.camera_device_id);
8458            let len = __tmp.len();
8459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8460        } else {
8461            __tmp.len()
8462        }
8463    }
8464}
8465#[doc = "Camera-IMU triggering and synchronisation message."]
8466#[doc = ""]
8467#[doc = "ID: 112"]
8468#[derive(Debug, Clone, PartialEq)]
8469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8471#[cfg_attr(feature = "ts", derive(TS))]
8472#[cfg_attr(feature = "ts", ts(export))]
8473pub struct CAMERA_TRIGGER_DATA {
8474    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8475    pub time_usec: u64,
8476    #[doc = "Image frame sequence"]
8477    pub seq: u32,
8478}
8479impl CAMERA_TRIGGER_DATA {
8480    pub const ENCODED_LEN: usize = 12usize;
8481    pub const DEFAULT: Self = Self {
8482        time_usec: 0_u64,
8483        seq: 0_u32,
8484    };
8485    #[cfg(feature = "arbitrary")]
8486    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8487        use arbitrary::{Arbitrary, Unstructured};
8488        let mut buf = [0u8; 1024];
8489        rng.fill_bytes(&mut buf);
8490        let mut unstructured = Unstructured::new(&buf);
8491        Self::arbitrary(&mut unstructured).unwrap_or_default()
8492    }
8493}
8494impl Default for CAMERA_TRIGGER_DATA {
8495    fn default() -> Self {
8496        Self::DEFAULT.clone()
8497    }
8498}
8499impl MessageData for CAMERA_TRIGGER_DATA {
8500    type Message = MavMessage;
8501    const ID: u32 = 112u32;
8502    const NAME: &'static str = "CAMERA_TRIGGER";
8503    const EXTRA_CRC: u8 = 174u8;
8504    const ENCODED_LEN: usize = 12usize;
8505    fn deser(
8506        _version: MavlinkVersion,
8507        __input: &[u8],
8508    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8509        let avail_len = __input.len();
8510        let mut payload_buf = [0; Self::ENCODED_LEN];
8511        let mut buf = if avail_len < Self::ENCODED_LEN {
8512            payload_buf[0..avail_len].copy_from_slice(__input);
8513            Bytes::new(&payload_buf)
8514        } else {
8515            Bytes::new(__input)
8516        };
8517        let mut __struct = Self::default();
8518        __struct.time_usec = buf.get_u64_le();
8519        __struct.seq = buf.get_u32_le();
8520        Ok(__struct)
8521    }
8522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8523        let mut __tmp = BytesMut::new(bytes);
8524        #[allow(clippy::absurd_extreme_comparisons)]
8525        #[allow(unused_comparisons)]
8526        if __tmp.remaining() < Self::ENCODED_LEN {
8527            panic!(
8528                "buffer is too small (need {} bytes, but got {})",
8529                Self::ENCODED_LEN,
8530                __tmp.remaining(),
8531            )
8532        }
8533        __tmp.put_u64_le(self.time_usec);
8534        __tmp.put_u32_le(self.seq);
8535        if matches!(version, MavlinkVersion::V2) {
8536            let len = __tmp.len();
8537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8538        } else {
8539            __tmp.len()
8540        }
8541    }
8542}
8543#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8544#[doc = ""]
8545#[doc = "ID: 387"]
8546#[derive(Debug, Clone, PartialEq)]
8547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8549#[cfg_attr(feature = "ts", derive(TS))]
8550#[cfg_attr(feature = "ts", ts(export))]
8551pub struct CANFD_FRAME_DATA {
8552    #[doc = "Frame ID"]
8553    pub id: u32,
8554    #[doc = "System ID."]
8555    pub target_system: u8,
8556    #[doc = "Component ID."]
8557    pub target_component: u8,
8558    #[doc = "bus number"]
8559    pub bus: u8,
8560    #[doc = "Frame length"]
8561    pub len: u8,
8562    #[doc = "Frame data"]
8563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8564    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8565    pub data: [u8; 64],
8566}
8567impl CANFD_FRAME_DATA {
8568    pub const ENCODED_LEN: usize = 72usize;
8569    pub const DEFAULT: Self = Self {
8570        id: 0_u32,
8571        target_system: 0_u8,
8572        target_component: 0_u8,
8573        bus: 0_u8,
8574        len: 0_u8,
8575        data: [0_u8; 64usize],
8576    };
8577    #[cfg(feature = "arbitrary")]
8578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8579        use arbitrary::{Arbitrary, Unstructured};
8580        let mut buf = [0u8; 1024];
8581        rng.fill_bytes(&mut buf);
8582        let mut unstructured = Unstructured::new(&buf);
8583        Self::arbitrary(&mut unstructured).unwrap_or_default()
8584    }
8585}
8586impl Default for CANFD_FRAME_DATA {
8587    fn default() -> Self {
8588        Self::DEFAULT.clone()
8589    }
8590}
8591impl MessageData for CANFD_FRAME_DATA {
8592    type Message = MavMessage;
8593    const ID: u32 = 387u32;
8594    const NAME: &'static str = "CANFD_FRAME";
8595    const EXTRA_CRC: u8 = 4u8;
8596    const ENCODED_LEN: usize = 72usize;
8597    fn deser(
8598        _version: MavlinkVersion,
8599        __input: &[u8],
8600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8601        let avail_len = __input.len();
8602        let mut payload_buf = [0; Self::ENCODED_LEN];
8603        let mut buf = if avail_len < Self::ENCODED_LEN {
8604            payload_buf[0..avail_len].copy_from_slice(__input);
8605            Bytes::new(&payload_buf)
8606        } else {
8607            Bytes::new(__input)
8608        };
8609        let mut __struct = Self::default();
8610        __struct.id = buf.get_u32_le();
8611        __struct.target_system = buf.get_u8();
8612        __struct.target_component = buf.get_u8();
8613        __struct.bus = buf.get_u8();
8614        __struct.len = buf.get_u8();
8615        for v in &mut __struct.data {
8616            let val = buf.get_u8();
8617            *v = val;
8618        }
8619        Ok(__struct)
8620    }
8621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8622        let mut __tmp = BytesMut::new(bytes);
8623        #[allow(clippy::absurd_extreme_comparisons)]
8624        #[allow(unused_comparisons)]
8625        if __tmp.remaining() < Self::ENCODED_LEN {
8626            panic!(
8627                "buffer is too small (need {} bytes, but got {})",
8628                Self::ENCODED_LEN,
8629                __tmp.remaining(),
8630            )
8631        }
8632        __tmp.put_u32_le(self.id);
8633        __tmp.put_u8(self.target_system);
8634        __tmp.put_u8(self.target_component);
8635        __tmp.put_u8(self.bus);
8636        __tmp.put_u8(self.len);
8637        for val in &self.data {
8638            __tmp.put_u8(*val);
8639        }
8640        if matches!(version, MavlinkVersion::V2) {
8641            let len = __tmp.len();
8642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8643        } else {
8644            __tmp.len()
8645        }
8646    }
8647}
8648#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8649#[doc = ""]
8650#[doc = "ID: 388"]
8651#[derive(Debug, Clone, PartialEq)]
8652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8654#[cfg_attr(feature = "ts", derive(TS))]
8655#[cfg_attr(feature = "ts", ts(export))]
8656pub struct CAN_FILTER_MODIFY_DATA {
8657    #[doc = "filter IDs, length num_ids"]
8658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8660    pub ids: [u16; 16],
8661    #[doc = "System ID."]
8662    pub target_system: u8,
8663    #[doc = "Component ID."]
8664    pub target_component: u8,
8665    #[doc = "bus number"]
8666    pub bus: u8,
8667    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8668    pub operation: CanFilterOp,
8669    #[doc = "number of IDs in filter list"]
8670    pub num_ids: u8,
8671}
8672impl CAN_FILTER_MODIFY_DATA {
8673    pub const ENCODED_LEN: usize = 37usize;
8674    pub const DEFAULT: Self = Self {
8675        ids: [0_u16; 16usize],
8676        target_system: 0_u8,
8677        target_component: 0_u8,
8678        bus: 0_u8,
8679        operation: CanFilterOp::DEFAULT,
8680        num_ids: 0_u8,
8681    };
8682    #[cfg(feature = "arbitrary")]
8683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8684        use arbitrary::{Arbitrary, Unstructured};
8685        let mut buf = [0u8; 1024];
8686        rng.fill_bytes(&mut buf);
8687        let mut unstructured = Unstructured::new(&buf);
8688        Self::arbitrary(&mut unstructured).unwrap_or_default()
8689    }
8690}
8691impl Default for CAN_FILTER_MODIFY_DATA {
8692    fn default() -> Self {
8693        Self::DEFAULT.clone()
8694    }
8695}
8696impl MessageData for CAN_FILTER_MODIFY_DATA {
8697    type Message = MavMessage;
8698    const ID: u32 = 388u32;
8699    const NAME: &'static str = "CAN_FILTER_MODIFY";
8700    const EXTRA_CRC: u8 = 8u8;
8701    const ENCODED_LEN: usize = 37usize;
8702    fn deser(
8703        _version: MavlinkVersion,
8704        __input: &[u8],
8705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8706        let avail_len = __input.len();
8707        let mut payload_buf = [0; Self::ENCODED_LEN];
8708        let mut buf = if avail_len < Self::ENCODED_LEN {
8709            payload_buf[0..avail_len].copy_from_slice(__input);
8710            Bytes::new(&payload_buf)
8711        } else {
8712            Bytes::new(__input)
8713        };
8714        let mut __struct = Self::default();
8715        for v in &mut __struct.ids {
8716            let val = buf.get_u16_le();
8717            *v = val;
8718        }
8719        __struct.target_system = buf.get_u8();
8720        __struct.target_component = buf.get_u8();
8721        __struct.bus = buf.get_u8();
8722        let tmp = buf.get_u8();
8723        __struct.operation =
8724            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8725                enum_type: "CanFilterOp",
8726                value: tmp as u32,
8727            })?;
8728        __struct.num_ids = buf.get_u8();
8729        Ok(__struct)
8730    }
8731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8732        let mut __tmp = BytesMut::new(bytes);
8733        #[allow(clippy::absurd_extreme_comparisons)]
8734        #[allow(unused_comparisons)]
8735        if __tmp.remaining() < Self::ENCODED_LEN {
8736            panic!(
8737                "buffer is too small (need {} bytes, but got {})",
8738                Self::ENCODED_LEN,
8739                __tmp.remaining(),
8740            )
8741        }
8742        for val in &self.ids {
8743            __tmp.put_u16_le(*val);
8744        }
8745        __tmp.put_u8(self.target_system);
8746        __tmp.put_u8(self.target_component);
8747        __tmp.put_u8(self.bus);
8748        __tmp.put_u8(self.operation as u8);
8749        __tmp.put_u8(self.num_ids);
8750        if matches!(version, MavlinkVersion::V2) {
8751            let len = __tmp.len();
8752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8753        } else {
8754            __tmp.len()
8755        }
8756    }
8757}
8758#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8759#[doc = ""]
8760#[doc = "ID: 386"]
8761#[derive(Debug, Clone, PartialEq)]
8762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8764#[cfg_attr(feature = "ts", derive(TS))]
8765#[cfg_attr(feature = "ts", ts(export))]
8766pub struct CAN_FRAME_DATA {
8767    #[doc = "Frame ID"]
8768    pub id: u32,
8769    #[doc = "System ID."]
8770    pub target_system: u8,
8771    #[doc = "Component ID."]
8772    pub target_component: u8,
8773    #[doc = "Bus number"]
8774    pub bus: u8,
8775    #[doc = "Frame length"]
8776    pub len: u8,
8777    #[doc = "Frame data"]
8778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8780    pub data: [u8; 8],
8781}
8782impl CAN_FRAME_DATA {
8783    pub const ENCODED_LEN: usize = 16usize;
8784    pub const DEFAULT: Self = Self {
8785        id: 0_u32,
8786        target_system: 0_u8,
8787        target_component: 0_u8,
8788        bus: 0_u8,
8789        len: 0_u8,
8790        data: [0_u8; 8usize],
8791    };
8792    #[cfg(feature = "arbitrary")]
8793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8794        use arbitrary::{Arbitrary, Unstructured};
8795        let mut buf = [0u8; 1024];
8796        rng.fill_bytes(&mut buf);
8797        let mut unstructured = Unstructured::new(&buf);
8798        Self::arbitrary(&mut unstructured).unwrap_or_default()
8799    }
8800}
8801impl Default for CAN_FRAME_DATA {
8802    fn default() -> Self {
8803        Self::DEFAULT.clone()
8804    }
8805}
8806impl MessageData for CAN_FRAME_DATA {
8807    type Message = MavMessage;
8808    const ID: u32 = 386u32;
8809    const NAME: &'static str = "CAN_FRAME";
8810    const EXTRA_CRC: u8 = 132u8;
8811    const ENCODED_LEN: usize = 16usize;
8812    fn deser(
8813        _version: MavlinkVersion,
8814        __input: &[u8],
8815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8816        let avail_len = __input.len();
8817        let mut payload_buf = [0; Self::ENCODED_LEN];
8818        let mut buf = if avail_len < Self::ENCODED_LEN {
8819            payload_buf[0..avail_len].copy_from_slice(__input);
8820            Bytes::new(&payload_buf)
8821        } else {
8822            Bytes::new(__input)
8823        };
8824        let mut __struct = Self::default();
8825        __struct.id = buf.get_u32_le();
8826        __struct.target_system = buf.get_u8();
8827        __struct.target_component = buf.get_u8();
8828        __struct.bus = buf.get_u8();
8829        __struct.len = buf.get_u8();
8830        for v in &mut __struct.data {
8831            let val = buf.get_u8();
8832            *v = val;
8833        }
8834        Ok(__struct)
8835    }
8836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8837        let mut __tmp = BytesMut::new(bytes);
8838        #[allow(clippy::absurd_extreme_comparisons)]
8839        #[allow(unused_comparisons)]
8840        if __tmp.remaining() < Self::ENCODED_LEN {
8841            panic!(
8842                "buffer is too small (need {} bytes, but got {})",
8843                Self::ENCODED_LEN,
8844                __tmp.remaining(),
8845            )
8846        }
8847        __tmp.put_u32_le(self.id);
8848        __tmp.put_u8(self.target_system);
8849        __tmp.put_u8(self.target_component);
8850        __tmp.put_u8(self.bus);
8851        __tmp.put_u8(self.len);
8852        for val in &self.data {
8853            __tmp.put_u8(*val);
8854        }
8855        if matches!(version, MavlinkVersion::V2) {
8856            let len = __tmp.len();
8857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8858        } else {
8859            __tmp.len()
8860        }
8861    }
8862}
8863#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8864#[doc = ""]
8865#[doc = "ID: 336"]
8866#[derive(Debug, Clone, PartialEq)]
8867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8869#[cfg_attr(feature = "ts", derive(TS))]
8870#[cfg_attr(feature = "ts", ts(export))]
8871pub struct CELLULAR_CONFIG_DATA {
8872    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8873    pub enable_lte: u8,
8874    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8875    pub enable_pin: u8,
8876    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8877    #[cfg_attr(feature = "ts", ts(type = "string"))]
8878    pub pin: CharArray<16>,
8879    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8880    #[cfg_attr(feature = "ts", ts(type = "string"))]
8881    pub new_pin: CharArray<16>,
8882    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8883    #[cfg_attr(feature = "ts", ts(type = "string"))]
8884    pub apn: CharArray<32>,
8885    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8886    #[cfg_attr(feature = "ts", ts(type = "string"))]
8887    pub puk: CharArray<16>,
8888    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8889    pub roaming: u8,
8890    #[doc = "Message acceptance response (sent back to GS)."]
8891    pub response: CellularConfigResponse,
8892}
8893impl CELLULAR_CONFIG_DATA {
8894    pub const ENCODED_LEN: usize = 84usize;
8895    pub const DEFAULT: Self = Self {
8896        enable_lte: 0_u8,
8897        enable_pin: 0_u8,
8898        pin: CharArray::new([0_u8; 16usize]),
8899        new_pin: CharArray::new([0_u8; 16usize]),
8900        apn: CharArray::new([0_u8; 32usize]),
8901        puk: CharArray::new([0_u8; 16usize]),
8902        roaming: 0_u8,
8903        response: CellularConfigResponse::DEFAULT,
8904    };
8905    #[cfg(feature = "arbitrary")]
8906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8907        use arbitrary::{Arbitrary, Unstructured};
8908        let mut buf = [0u8; 1024];
8909        rng.fill_bytes(&mut buf);
8910        let mut unstructured = Unstructured::new(&buf);
8911        Self::arbitrary(&mut unstructured).unwrap_or_default()
8912    }
8913}
8914impl Default for CELLULAR_CONFIG_DATA {
8915    fn default() -> Self {
8916        Self::DEFAULT.clone()
8917    }
8918}
8919impl MessageData for CELLULAR_CONFIG_DATA {
8920    type Message = MavMessage;
8921    const ID: u32 = 336u32;
8922    const NAME: &'static str = "CELLULAR_CONFIG";
8923    const EXTRA_CRC: u8 = 245u8;
8924    const ENCODED_LEN: usize = 84usize;
8925    fn deser(
8926        _version: MavlinkVersion,
8927        __input: &[u8],
8928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8929        let avail_len = __input.len();
8930        let mut payload_buf = [0; Self::ENCODED_LEN];
8931        let mut buf = if avail_len < Self::ENCODED_LEN {
8932            payload_buf[0..avail_len].copy_from_slice(__input);
8933            Bytes::new(&payload_buf)
8934        } else {
8935            Bytes::new(__input)
8936        };
8937        let mut __struct = Self::default();
8938        __struct.enable_lte = buf.get_u8();
8939        __struct.enable_pin = buf.get_u8();
8940        let mut tmp = [0_u8; 16usize];
8941        for v in &mut tmp {
8942            *v = buf.get_u8();
8943        }
8944        __struct.pin = CharArray::new(tmp);
8945        let mut tmp = [0_u8; 16usize];
8946        for v in &mut tmp {
8947            *v = buf.get_u8();
8948        }
8949        __struct.new_pin = CharArray::new(tmp);
8950        let mut tmp = [0_u8; 32usize];
8951        for v in &mut tmp {
8952            *v = buf.get_u8();
8953        }
8954        __struct.apn = CharArray::new(tmp);
8955        let mut tmp = [0_u8; 16usize];
8956        for v in &mut tmp {
8957            *v = buf.get_u8();
8958        }
8959        __struct.puk = CharArray::new(tmp);
8960        __struct.roaming = buf.get_u8();
8961        let tmp = buf.get_u8();
8962        __struct.response =
8963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8964                enum_type: "CellularConfigResponse",
8965                value: tmp as u32,
8966            })?;
8967        Ok(__struct)
8968    }
8969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8970        let mut __tmp = BytesMut::new(bytes);
8971        #[allow(clippy::absurd_extreme_comparisons)]
8972        #[allow(unused_comparisons)]
8973        if __tmp.remaining() < Self::ENCODED_LEN {
8974            panic!(
8975                "buffer is too small (need {} bytes, but got {})",
8976                Self::ENCODED_LEN,
8977                __tmp.remaining(),
8978            )
8979        }
8980        __tmp.put_u8(self.enable_lte);
8981        __tmp.put_u8(self.enable_pin);
8982        for val in &self.pin {
8983            __tmp.put_u8(*val);
8984        }
8985        for val in &self.new_pin {
8986            __tmp.put_u8(*val);
8987        }
8988        for val in &self.apn {
8989            __tmp.put_u8(*val);
8990        }
8991        for val in &self.puk {
8992            __tmp.put_u8(*val);
8993        }
8994        __tmp.put_u8(self.roaming);
8995        __tmp.put_u8(self.response as u8);
8996        if matches!(version, MavlinkVersion::V2) {
8997            let len = __tmp.len();
8998            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8999        } else {
9000            __tmp.len()
9001        }
9002    }
9003}
9004#[doc = "Report current used cellular network status."]
9005#[doc = ""]
9006#[doc = "ID: 334"]
9007#[derive(Debug, Clone, PartialEq)]
9008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9010#[cfg_attr(feature = "ts", derive(TS))]
9011#[cfg_attr(feature = "ts", ts(export))]
9012pub struct CELLULAR_STATUS_DATA {
9013    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9014    pub mcc: u16,
9015    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9016    pub mnc: u16,
9017    #[doc = "Location area code. If unknown, set to 0"]
9018    pub lac: u16,
9019    #[doc = "Cellular modem status"]
9020    pub status: CellularStatusFlag,
9021    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9022    pub failure_reason: CellularNetworkFailedReason,
9023    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9024    pub mavtype: CellularNetworkRadioType,
9025    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9026    pub quality: u8,
9027}
9028impl CELLULAR_STATUS_DATA {
9029    pub const ENCODED_LEN: usize = 10usize;
9030    pub const DEFAULT: Self = Self {
9031        mcc: 0_u16,
9032        mnc: 0_u16,
9033        lac: 0_u16,
9034        status: CellularStatusFlag::DEFAULT,
9035        failure_reason: CellularNetworkFailedReason::DEFAULT,
9036        mavtype: CellularNetworkRadioType::DEFAULT,
9037        quality: 0_u8,
9038    };
9039    #[cfg(feature = "arbitrary")]
9040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9041        use arbitrary::{Arbitrary, Unstructured};
9042        let mut buf = [0u8; 1024];
9043        rng.fill_bytes(&mut buf);
9044        let mut unstructured = Unstructured::new(&buf);
9045        Self::arbitrary(&mut unstructured).unwrap_or_default()
9046    }
9047}
9048impl Default for CELLULAR_STATUS_DATA {
9049    fn default() -> Self {
9050        Self::DEFAULT.clone()
9051    }
9052}
9053impl MessageData for CELLULAR_STATUS_DATA {
9054    type Message = MavMessage;
9055    const ID: u32 = 334u32;
9056    const NAME: &'static str = "CELLULAR_STATUS";
9057    const EXTRA_CRC: u8 = 72u8;
9058    const ENCODED_LEN: usize = 10usize;
9059    fn deser(
9060        _version: MavlinkVersion,
9061        __input: &[u8],
9062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9063        let avail_len = __input.len();
9064        let mut payload_buf = [0; Self::ENCODED_LEN];
9065        let mut buf = if avail_len < Self::ENCODED_LEN {
9066            payload_buf[0..avail_len].copy_from_slice(__input);
9067            Bytes::new(&payload_buf)
9068        } else {
9069            Bytes::new(__input)
9070        };
9071        let mut __struct = Self::default();
9072        __struct.mcc = buf.get_u16_le();
9073        __struct.mnc = buf.get_u16_le();
9074        __struct.lac = buf.get_u16_le();
9075        let tmp = buf.get_u8();
9076        __struct.status =
9077            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9078                enum_type: "CellularStatusFlag",
9079                value: tmp as u32,
9080            })?;
9081        let tmp = buf.get_u8();
9082        __struct.failure_reason =
9083            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9084                enum_type: "CellularNetworkFailedReason",
9085                value: tmp as u32,
9086            })?;
9087        let tmp = buf.get_u8();
9088        __struct.mavtype =
9089            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9090                enum_type: "CellularNetworkRadioType",
9091                value: tmp as u32,
9092            })?;
9093        __struct.quality = buf.get_u8();
9094        Ok(__struct)
9095    }
9096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9097        let mut __tmp = BytesMut::new(bytes);
9098        #[allow(clippy::absurd_extreme_comparisons)]
9099        #[allow(unused_comparisons)]
9100        if __tmp.remaining() < Self::ENCODED_LEN {
9101            panic!(
9102                "buffer is too small (need {} bytes, but got {})",
9103                Self::ENCODED_LEN,
9104                __tmp.remaining(),
9105            )
9106        }
9107        __tmp.put_u16_le(self.mcc);
9108        __tmp.put_u16_le(self.mnc);
9109        __tmp.put_u16_le(self.lac);
9110        __tmp.put_u8(self.status as u8);
9111        __tmp.put_u8(self.failure_reason as u8);
9112        __tmp.put_u8(self.mavtype as u8);
9113        __tmp.put_u8(self.quality);
9114        if matches!(version, MavlinkVersion::V2) {
9115            let len = __tmp.len();
9116            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9117        } else {
9118            __tmp.len()
9119        }
9120    }
9121}
9122#[doc = "Request to control this MAV."]
9123#[doc = ""]
9124#[doc = "ID: 5"]
9125#[derive(Debug, Clone, PartialEq)]
9126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9128#[cfg_attr(feature = "ts", derive(TS))]
9129#[cfg_attr(feature = "ts", ts(export))]
9130pub struct CHANGE_OPERATOR_CONTROL_DATA {
9131    #[doc = "System the GCS requests control for"]
9132    pub target_system: u8,
9133    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9134    pub control_request: u8,
9135    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9136    pub version: u8,
9137    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9138    #[cfg_attr(feature = "ts", ts(type = "string"))]
9139    pub passkey: CharArray<25>,
9140}
9141impl CHANGE_OPERATOR_CONTROL_DATA {
9142    pub const ENCODED_LEN: usize = 28usize;
9143    pub const DEFAULT: Self = Self {
9144        target_system: 0_u8,
9145        control_request: 0_u8,
9146        version: 0_u8,
9147        passkey: CharArray::new([0_u8; 25usize]),
9148    };
9149    #[cfg(feature = "arbitrary")]
9150    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9151        use arbitrary::{Arbitrary, Unstructured};
9152        let mut buf = [0u8; 1024];
9153        rng.fill_bytes(&mut buf);
9154        let mut unstructured = Unstructured::new(&buf);
9155        Self::arbitrary(&mut unstructured).unwrap_or_default()
9156    }
9157}
9158impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9159    fn default() -> Self {
9160        Self::DEFAULT.clone()
9161    }
9162}
9163impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9164    type Message = MavMessage;
9165    const ID: u32 = 5u32;
9166    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9167    const EXTRA_CRC: u8 = 217u8;
9168    const ENCODED_LEN: usize = 28usize;
9169    fn deser(
9170        _version: MavlinkVersion,
9171        __input: &[u8],
9172    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9173        let avail_len = __input.len();
9174        let mut payload_buf = [0; Self::ENCODED_LEN];
9175        let mut buf = if avail_len < Self::ENCODED_LEN {
9176            payload_buf[0..avail_len].copy_from_slice(__input);
9177            Bytes::new(&payload_buf)
9178        } else {
9179            Bytes::new(__input)
9180        };
9181        let mut __struct = Self::default();
9182        __struct.target_system = buf.get_u8();
9183        __struct.control_request = buf.get_u8();
9184        __struct.version = buf.get_u8();
9185        let mut tmp = [0_u8; 25usize];
9186        for v in &mut tmp {
9187            *v = buf.get_u8();
9188        }
9189        __struct.passkey = CharArray::new(tmp);
9190        Ok(__struct)
9191    }
9192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9193        let mut __tmp = BytesMut::new(bytes);
9194        #[allow(clippy::absurd_extreme_comparisons)]
9195        #[allow(unused_comparisons)]
9196        if __tmp.remaining() < Self::ENCODED_LEN {
9197            panic!(
9198                "buffer is too small (need {} bytes, but got {})",
9199                Self::ENCODED_LEN,
9200                __tmp.remaining(),
9201            )
9202        }
9203        __tmp.put_u8(self.target_system);
9204        __tmp.put_u8(self.control_request);
9205        __tmp.put_u8(self.version);
9206        for val in &self.passkey {
9207            __tmp.put_u8(*val);
9208        }
9209        if matches!(version, MavlinkVersion::V2) {
9210            let len = __tmp.len();
9211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9212        } else {
9213            __tmp.len()
9214        }
9215    }
9216}
9217#[doc = "Accept / deny control of this MAV."]
9218#[doc = ""]
9219#[doc = "ID: 6"]
9220#[derive(Debug, Clone, PartialEq)]
9221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9223#[cfg_attr(feature = "ts", derive(TS))]
9224#[cfg_attr(feature = "ts", ts(export))]
9225pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9226    #[doc = "ID of the GCS this message"]
9227    pub gcs_system_id: u8,
9228    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9229    pub control_request: u8,
9230    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9231    pub ack: u8,
9232}
9233impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9234    pub const ENCODED_LEN: usize = 3usize;
9235    pub const DEFAULT: Self = Self {
9236        gcs_system_id: 0_u8,
9237        control_request: 0_u8,
9238        ack: 0_u8,
9239    };
9240    #[cfg(feature = "arbitrary")]
9241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9242        use arbitrary::{Arbitrary, Unstructured};
9243        let mut buf = [0u8; 1024];
9244        rng.fill_bytes(&mut buf);
9245        let mut unstructured = Unstructured::new(&buf);
9246        Self::arbitrary(&mut unstructured).unwrap_or_default()
9247    }
9248}
9249impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9250    fn default() -> Self {
9251        Self::DEFAULT.clone()
9252    }
9253}
9254impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9255    type Message = MavMessage;
9256    const ID: u32 = 6u32;
9257    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9258    const EXTRA_CRC: u8 = 104u8;
9259    const ENCODED_LEN: usize = 3usize;
9260    fn deser(
9261        _version: MavlinkVersion,
9262        __input: &[u8],
9263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9264        let avail_len = __input.len();
9265        let mut payload_buf = [0; Self::ENCODED_LEN];
9266        let mut buf = if avail_len < Self::ENCODED_LEN {
9267            payload_buf[0..avail_len].copy_from_slice(__input);
9268            Bytes::new(&payload_buf)
9269        } else {
9270            Bytes::new(__input)
9271        };
9272        let mut __struct = Self::default();
9273        __struct.gcs_system_id = buf.get_u8();
9274        __struct.control_request = buf.get_u8();
9275        __struct.ack = buf.get_u8();
9276        Ok(__struct)
9277    }
9278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9279        let mut __tmp = BytesMut::new(bytes);
9280        #[allow(clippy::absurd_extreme_comparisons)]
9281        #[allow(unused_comparisons)]
9282        if __tmp.remaining() < Self::ENCODED_LEN {
9283            panic!(
9284                "buffer is too small (need {} bytes, but got {})",
9285                Self::ENCODED_LEN,
9286                __tmp.remaining(),
9287            )
9288        }
9289        __tmp.put_u8(self.gcs_system_id);
9290        __tmp.put_u8(self.control_request);
9291        __tmp.put_u8(self.ack);
9292        if matches!(version, MavlinkVersion::V2) {
9293            let len = __tmp.len();
9294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9295        } else {
9296            __tmp.len()
9297        }
9298    }
9299}
9300#[doc = "Information about a potential collision."]
9301#[doc = ""]
9302#[doc = "ID: 247"]
9303#[derive(Debug, Clone, PartialEq)]
9304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9306#[cfg_attr(feature = "ts", derive(TS))]
9307#[cfg_attr(feature = "ts", ts(export))]
9308pub struct COLLISION_DATA {
9309    #[doc = "Unique identifier, domain based on src field"]
9310    pub id: u32,
9311    #[doc = "Estimated time until collision occurs"]
9312    pub time_to_minimum_delta: f32,
9313    #[doc = "Closest vertical distance between vehicle and object"]
9314    pub altitude_minimum_delta: f32,
9315    #[doc = "Closest horizontal distance between vehicle and object"]
9316    pub horizontal_minimum_delta: f32,
9317    #[doc = "Collision data source"]
9318    pub src: MavCollisionSrc,
9319    #[doc = "Action that is being taken to avoid this collision"]
9320    pub action: MavCollisionAction,
9321    #[doc = "How concerned the aircraft is about this collision"]
9322    pub threat_level: MavCollisionThreatLevel,
9323}
9324impl COLLISION_DATA {
9325    pub const ENCODED_LEN: usize = 19usize;
9326    pub const DEFAULT: Self = Self {
9327        id: 0_u32,
9328        time_to_minimum_delta: 0.0_f32,
9329        altitude_minimum_delta: 0.0_f32,
9330        horizontal_minimum_delta: 0.0_f32,
9331        src: MavCollisionSrc::DEFAULT,
9332        action: MavCollisionAction::DEFAULT,
9333        threat_level: MavCollisionThreatLevel::DEFAULT,
9334    };
9335    #[cfg(feature = "arbitrary")]
9336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9337        use arbitrary::{Arbitrary, Unstructured};
9338        let mut buf = [0u8; 1024];
9339        rng.fill_bytes(&mut buf);
9340        let mut unstructured = Unstructured::new(&buf);
9341        Self::arbitrary(&mut unstructured).unwrap_or_default()
9342    }
9343}
9344impl Default for COLLISION_DATA {
9345    fn default() -> Self {
9346        Self::DEFAULT.clone()
9347    }
9348}
9349impl MessageData for COLLISION_DATA {
9350    type Message = MavMessage;
9351    const ID: u32 = 247u32;
9352    const NAME: &'static str = "COLLISION";
9353    const EXTRA_CRC: u8 = 81u8;
9354    const ENCODED_LEN: usize = 19usize;
9355    fn deser(
9356        _version: MavlinkVersion,
9357        __input: &[u8],
9358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9359        let avail_len = __input.len();
9360        let mut payload_buf = [0; Self::ENCODED_LEN];
9361        let mut buf = if avail_len < Self::ENCODED_LEN {
9362            payload_buf[0..avail_len].copy_from_slice(__input);
9363            Bytes::new(&payload_buf)
9364        } else {
9365            Bytes::new(__input)
9366        };
9367        let mut __struct = Self::default();
9368        __struct.id = buf.get_u32_le();
9369        __struct.time_to_minimum_delta = buf.get_f32_le();
9370        __struct.altitude_minimum_delta = buf.get_f32_le();
9371        __struct.horizontal_minimum_delta = buf.get_f32_le();
9372        let tmp = buf.get_u8();
9373        __struct.src =
9374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9375                enum_type: "MavCollisionSrc",
9376                value: tmp as u32,
9377            })?;
9378        let tmp = buf.get_u8();
9379        __struct.action =
9380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9381                enum_type: "MavCollisionAction",
9382                value: tmp as u32,
9383            })?;
9384        let tmp = buf.get_u8();
9385        __struct.threat_level =
9386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9387                enum_type: "MavCollisionThreatLevel",
9388                value: tmp as u32,
9389            })?;
9390        Ok(__struct)
9391    }
9392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9393        let mut __tmp = BytesMut::new(bytes);
9394        #[allow(clippy::absurd_extreme_comparisons)]
9395        #[allow(unused_comparisons)]
9396        if __tmp.remaining() < Self::ENCODED_LEN {
9397            panic!(
9398                "buffer is too small (need {} bytes, but got {})",
9399                Self::ENCODED_LEN,
9400                __tmp.remaining(),
9401            )
9402        }
9403        __tmp.put_u32_le(self.id);
9404        __tmp.put_f32_le(self.time_to_minimum_delta);
9405        __tmp.put_f32_le(self.altitude_minimum_delta);
9406        __tmp.put_f32_le(self.horizontal_minimum_delta);
9407        __tmp.put_u8(self.src as u8);
9408        __tmp.put_u8(self.action as u8);
9409        __tmp.put_u8(self.threat_level as u8);
9410        if matches!(version, MavlinkVersion::V2) {
9411            let len = __tmp.len();
9412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9413        } else {
9414            __tmp.len()
9415        }
9416    }
9417}
9418#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9419#[doc = ""]
9420#[doc = "ID: 77"]
9421#[derive(Debug, Clone, PartialEq)]
9422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9424#[cfg_attr(feature = "ts", derive(TS))]
9425#[cfg_attr(feature = "ts", ts(export))]
9426pub struct COMMAND_ACK_DATA {
9427    #[doc = "Command ID (of acknowledged command)."]
9428    pub command: MavCmd,
9429    #[doc = "Result of command."]
9430    pub result: MavResult,
9431    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9433    pub progress: u8,
9434    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9436    pub result_param2: i32,
9437    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9439    pub target_system: u8,
9440    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9442    pub target_component: u8,
9443}
9444impl COMMAND_ACK_DATA {
9445    pub const ENCODED_LEN: usize = 10usize;
9446    pub const DEFAULT: Self = Self {
9447        command: MavCmd::DEFAULT,
9448        result: MavResult::DEFAULT,
9449        progress: 0_u8,
9450        result_param2: 0_i32,
9451        target_system: 0_u8,
9452        target_component: 0_u8,
9453    };
9454    #[cfg(feature = "arbitrary")]
9455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9456        use arbitrary::{Arbitrary, Unstructured};
9457        let mut buf = [0u8; 1024];
9458        rng.fill_bytes(&mut buf);
9459        let mut unstructured = Unstructured::new(&buf);
9460        Self::arbitrary(&mut unstructured).unwrap_or_default()
9461    }
9462}
9463impl Default for COMMAND_ACK_DATA {
9464    fn default() -> Self {
9465        Self::DEFAULT.clone()
9466    }
9467}
9468impl MessageData for COMMAND_ACK_DATA {
9469    type Message = MavMessage;
9470    const ID: u32 = 77u32;
9471    const NAME: &'static str = "COMMAND_ACK";
9472    const EXTRA_CRC: u8 = 143u8;
9473    const ENCODED_LEN: usize = 10usize;
9474    fn deser(
9475        _version: MavlinkVersion,
9476        __input: &[u8],
9477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9478        let avail_len = __input.len();
9479        let mut payload_buf = [0; Self::ENCODED_LEN];
9480        let mut buf = if avail_len < Self::ENCODED_LEN {
9481            payload_buf[0..avail_len].copy_from_slice(__input);
9482            Bytes::new(&payload_buf)
9483        } else {
9484            Bytes::new(__input)
9485        };
9486        let mut __struct = Self::default();
9487        let tmp = buf.get_u16_le();
9488        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9489            ::mavlink_core::error::ParserError::InvalidEnum {
9490                enum_type: "MavCmd",
9491                value: tmp as u32,
9492            },
9493        )?;
9494        let tmp = buf.get_u8();
9495        __struct.result =
9496            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9497                enum_type: "MavResult",
9498                value: tmp as u32,
9499            })?;
9500        __struct.progress = buf.get_u8();
9501        __struct.result_param2 = buf.get_i32_le();
9502        __struct.target_system = buf.get_u8();
9503        __struct.target_component = buf.get_u8();
9504        Ok(__struct)
9505    }
9506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9507        let mut __tmp = BytesMut::new(bytes);
9508        #[allow(clippy::absurd_extreme_comparisons)]
9509        #[allow(unused_comparisons)]
9510        if __tmp.remaining() < Self::ENCODED_LEN {
9511            panic!(
9512                "buffer is too small (need {} bytes, but got {})",
9513                Self::ENCODED_LEN,
9514                __tmp.remaining(),
9515            )
9516        }
9517        __tmp.put_u16_le(self.command as u16);
9518        __tmp.put_u8(self.result as u8);
9519        if matches!(version, MavlinkVersion::V2) {
9520            __tmp.put_u8(self.progress);
9521            __tmp.put_i32_le(self.result_param2);
9522            __tmp.put_u8(self.target_system);
9523            __tmp.put_u8(self.target_component);
9524            let len = __tmp.len();
9525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9526        } else {
9527            __tmp.len()
9528        }
9529    }
9530}
9531#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9532#[doc = ""]
9533#[doc = "ID: 80"]
9534#[derive(Debug, Clone, PartialEq)]
9535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9537#[cfg_attr(feature = "ts", derive(TS))]
9538#[cfg_attr(feature = "ts", ts(export))]
9539pub struct COMMAND_CANCEL_DATA {
9540    #[doc = "Command ID (of command to cancel)."]
9541    pub command: MavCmd,
9542    #[doc = "System executing long running command. Should not be broadcast (0)."]
9543    pub target_system: u8,
9544    #[doc = "Component executing long running command."]
9545    pub target_component: u8,
9546}
9547impl COMMAND_CANCEL_DATA {
9548    pub const ENCODED_LEN: usize = 4usize;
9549    pub const DEFAULT: Self = Self {
9550        command: MavCmd::DEFAULT,
9551        target_system: 0_u8,
9552        target_component: 0_u8,
9553    };
9554    #[cfg(feature = "arbitrary")]
9555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9556        use arbitrary::{Arbitrary, Unstructured};
9557        let mut buf = [0u8; 1024];
9558        rng.fill_bytes(&mut buf);
9559        let mut unstructured = Unstructured::new(&buf);
9560        Self::arbitrary(&mut unstructured).unwrap_or_default()
9561    }
9562}
9563impl Default for COMMAND_CANCEL_DATA {
9564    fn default() -> Self {
9565        Self::DEFAULT.clone()
9566    }
9567}
9568impl MessageData for COMMAND_CANCEL_DATA {
9569    type Message = MavMessage;
9570    const ID: u32 = 80u32;
9571    const NAME: &'static str = "COMMAND_CANCEL";
9572    const EXTRA_CRC: u8 = 14u8;
9573    const ENCODED_LEN: usize = 4usize;
9574    fn deser(
9575        _version: MavlinkVersion,
9576        __input: &[u8],
9577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9578        let avail_len = __input.len();
9579        let mut payload_buf = [0; Self::ENCODED_LEN];
9580        let mut buf = if avail_len < Self::ENCODED_LEN {
9581            payload_buf[0..avail_len].copy_from_slice(__input);
9582            Bytes::new(&payload_buf)
9583        } else {
9584            Bytes::new(__input)
9585        };
9586        let mut __struct = Self::default();
9587        let tmp = buf.get_u16_le();
9588        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9589            ::mavlink_core::error::ParserError::InvalidEnum {
9590                enum_type: "MavCmd",
9591                value: tmp as u32,
9592            },
9593        )?;
9594        __struct.target_system = buf.get_u8();
9595        __struct.target_component = buf.get_u8();
9596        Ok(__struct)
9597    }
9598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9599        let mut __tmp = BytesMut::new(bytes);
9600        #[allow(clippy::absurd_extreme_comparisons)]
9601        #[allow(unused_comparisons)]
9602        if __tmp.remaining() < Self::ENCODED_LEN {
9603            panic!(
9604                "buffer is too small (need {} bytes, but got {})",
9605                Self::ENCODED_LEN,
9606                __tmp.remaining(),
9607            )
9608        }
9609        __tmp.put_u16_le(self.command as u16);
9610        __tmp.put_u8(self.target_system);
9611        __tmp.put_u8(self.target_component);
9612        if matches!(version, MavlinkVersion::V2) {
9613            let len = __tmp.len();
9614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9615        } else {
9616            __tmp.len()
9617        }
9618    }
9619}
9620#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9621#[doc = ""]
9622#[doc = "ID: 75"]
9623#[derive(Debug, Clone, PartialEq)]
9624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9626#[cfg_attr(feature = "ts", derive(TS))]
9627#[cfg_attr(feature = "ts", ts(export))]
9628pub struct COMMAND_INT_DATA {
9629    #[doc = "PARAM1, see MAV_CMD enum"]
9630    pub param1: f32,
9631    #[doc = "PARAM2, see MAV_CMD enum"]
9632    pub param2: f32,
9633    #[doc = "PARAM3, see MAV_CMD enum"]
9634    pub param3: f32,
9635    #[doc = "PARAM4, see MAV_CMD enum"]
9636    pub param4: f32,
9637    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9638    pub x: i32,
9639    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9640    pub y: i32,
9641    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9642    pub z: f32,
9643    #[doc = "The scheduled action for the mission item."]
9644    pub command: MavCmd,
9645    #[doc = "System ID"]
9646    pub target_system: u8,
9647    #[doc = "Component ID"]
9648    pub target_component: u8,
9649    #[doc = "The coordinate system of the COMMAND."]
9650    pub frame: MavFrame,
9651    #[doc = "Not used."]
9652    pub current: u8,
9653    #[doc = "Not used (set 0)."]
9654    pub autocontinue: u8,
9655}
9656impl COMMAND_INT_DATA {
9657    pub const ENCODED_LEN: usize = 35usize;
9658    pub const DEFAULT: Self = Self {
9659        param1: 0.0_f32,
9660        param2: 0.0_f32,
9661        param3: 0.0_f32,
9662        param4: 0.0_f32,
9663        x: 0_i32,
9664        y: 0_i32,
9665        z: 0.0_f32,
9666        command: MavCmd::DEFAULT,
9667        target_system: 0_u8,
9668        target_component: 0_u8,
9669        frame: MavFrame::DEFAULT,
9670        current: 0_u8,
9671        autocontinue: 0_u8,
9672    };
9673    #[cfg(feature = "arbitrary")]
9674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9675        use arbitrary::{Arbitrary, Unstructured};
9676        let mut buf = [0u8; 1024];
9677        rng.fill_bytes(&mut buf);
9678        let mut unstructured = Unstructured::new(&buf);
9679        Self::arbitrary(&mut unstructured).unwrap_or_default()
9680    }
9681}
9682impl Default for COMMAND_INT_DATA {
9683    fn default() -> Self {
9684        Self::DEFAULT.clone()
9685    }
9686}
9687impl MessageData for COMMAND_INT_DATA {
9688    type Message = MavMessage;
9689    const ID: u32 = 75u32;
9690    const NAME: &'static str = "COMMAND_INT";
9691    const EXTRA_CRC: u8 = 158u8;
9692    const ENCODED_LEN: usize = 35usize;
9693    fn deser(
9694        _version: MavlinkVersion,
9695        __input: &[u8],
9696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9697        let avail_len = __input.len();
9698        let mut payload_buf = [0; Self::ENCODED_LEN];
9699        let mut buf = if avail_len < Self::ENCODED_LEN {
9700            payload_buf[0..avail_len].copy_from_slice(__input);
9701            Bytes::new(&payload_buf)
9702        } else {
9703            Bytes::new(__input)
9704        };
9705        let mut __struct = Self::default();
9706        __struct.param1 = buf.get_f32_le();
9707        __struct.param2 = buf.get_f32_le();
9708        __struct.param3 = buf.get_f32_le();
9709        __struct.param4 = buf.get_f32_le();
9710        __struct.x = buf.get_i32_le();
9711        __struct.y = buf.get_i32_le();
9712        __struct.z = buf.get_f32_le();
9713        let tmp = buf.get_u16_le();
9714        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9715            ::mavlink_core::error::ParserError::InvalidEnum {
9716                enum_type: "MavCmd",
9717                value: tmp as u32,
9718            },
9719        )?;
9720        __struct.target_system = buf.get_u8();
9721        __struct.target_component = buf.get_u8();
9722        let tmp = buf.get_u8();
9723        __struct.frame =
9724            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9725                enum_type: "MavFrame",
9726                value: tmp as u32,
9727            })?;
9728        __struct.current = buf.get_u8();
9729        __struct.autocontinue = buf.get_u8();
9730        Ok(__struct)
9731    }
9732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9733        let mut __tmp = BytesMut::new(bytes);
9734        #[allow(clippy::absurd_extreme_comparisons)]
9735        #[allow(unused_comparisons)]
9736        if __tmp.remaining() < Self::ENCODED_LEN {
9737            panic!(
9738                "buffer is too small (need {} bytes, but got {})",
9739                Self::ENCODED_LEN,
9740                __tmp.remaining(),
9741            )
9742        }
9743        __tmp.put_f32_le(self.param1);
9744        __tmp.put_f32_le(self.param2);
9745        __tmp.put_f32_le(self.param3);
9746        __tmp.put_f32_le(self.param4);
9747        __tmp.put_i32_le(self.x);
9748        __tmp.put_i32_le(self.y);
9749        __tmp.put_f32_le(self.z);
9750        __tmp.put_u16_le(self.command as u16);
9751        __tmp.put_u8(self.target_system);
9752        __tmp.put_u8(self.target_component);
9753        __tmp.put_u8(self.frame as u8);
9754        __tmp.put_u8(self.current);
9755        __tmp.put_u8(self.autocontinue);
9756        if matches!(version, MavlinkVersion::V2) {
9757            let len = __tmp.len();
9758            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9759        } else {
9760            __tmp.len()
9761        }
9762    }
9763}
9764#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9765#[doc = ""]
9766#[doc = "ID: 76"]
9767#[derive(Debug, Clone, PartialEq)]
9768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9770#[cfg_attr(feature = "ts", derive(TS))]
9771#[cfg_attr(feature = "ts", ts(export))]
9772pub struct COMMAND_LONG_DATA {
9773    #[doc = "Parameter 1 (for the specific command)."]
9774    pub param1: f32,
9775    #[doc = "Parameter 2 (for the specific command)."]
9776    pub param2: f32,
9777    #[doc = "Parameter 3 (for the specific command)."]
9778    pub param3: f32,
9779    #[doc = "Parameter 4 (for the specific command)."]
9780    pub param4: f32,
9781    #[doc = "Parameter 5 (for the specific command)."]
9782    pub param5: f32,
9783    #[doc = "Parameter 6 (for the specific command)."]
9784    pub param6: f32,
9785    #[doc = "Parameter 7 (for the specific command)."]
9786    pub param7: f32,
9787    #[doc = "Command ID (of command to send)."]
9788    pub command: MavCmd,
9789    #[doc = "System which should execute the command"]
9790    pub target_system: u8,
9791    #[doc = "Component which should execute the command, 0 for all components"]
9792    pub target_component: u8,
9793    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9794    pub confirmation: u8,
9795}
9796impl COMMAND_LONG_DATA {
9797    pub const ENCODED_LEN: usize = 33usize;
9798    pub const DEFAULT: Self = Self {
9799        param1: 0.0_f32,
9800        param2: 0.0_f32,
9801        param3: 0.0_f32,
9802        param4: 0.0_f32,
9803        param5: 0.0_f32,
9804        param6: 0.0_f32,
9805        param7: 0.0_f32,
9806        command: MavCmd::DEFAULT,
9807        target_system: 0_u8,
9808        target_component: 0_u8,
9809        confirmation: 0_u8,
9810    };
9811    #[cfg(feature = "arbitrary")]
9812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9813        use arbitrary::{Arbitrary, Unstructured};
9814        let mut buf = [0u8; 1024];
9815        rng.fill_bytes(&mut buf);
9816        let mut unstructured = Unstructured::new(&buf);
9817        Self::arbitrary(&mut unstructured).unwrap_or_default()
9818    }
9819}
9820impl Default for COMMAND_LONG_DATA {
9821    fn default() -> Self {
9822        Self::DEFAULT.clone()
9823    }
9824}
9825impl MessageData for COMMAND_LONG_DATA {
9826    type Message = MavMessage;
9827    const ID: u32 = 76u32;
9828    const NAME: &'static str = "COMMAND_LONG";
9829    const EXTRA_CRC: u8 = 152u8;
9830    const ENCODED_LEN: usize = 33usize;
9831    fn deser(
9832        _version: MavlinkVersion,
9833        __input: &[u8],
9834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9835        let avail_len = __input.len();
9836        let mut payload_buf = [0; Self::ENCODED_LEN];
9837        let mut buf = if avail_len < Self::ENCODED_LEN {
9838            payload_buf[0..avail_len].copy_from_slice(__input);
9839            Bytes::new(&payload_buf)
9840        } else {
9841            Bytes::new(__input)
9842        };
9843        let mut __struct = Self::default();
9844        __struct.param1 = buf.get_f32_le();
9845        __struct.param2 = buf.get_f32_le();
9846        __struct.param3 = buf.get_f32_le();
9847        __struct.param4 = buf.get_f32_le();
9848        __struct.param5 = buf.get_f32_le();
9849        __struct.param6 = buf.get_f32_le();
9850        __struct.param7 = buf.get_f32_le();
9851        let tmp = buf.get_u16_le();
9852        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9853            ::mavlink_core::error::ParserError::InvalidEnum {
9854                enum_type: "MavCmd",
9855                value: tmp as u32,
9856            },
9857        )?;
9858        __struct.target_system = buf.get_u8();
9859        __struct.target_component = buf.get_u8();
9860        __struct.confirmation = buf.get_u8();
9861        Ok(__struct)
9862    }
9863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9864        let mut __tmp = BytesMut::new(bytes);
9865        #[allow(clippy::absurd_extreme_comparisons)]
9866        #[allow(unused_comparisons)]
9867        if __tmp.remaining() < Self::ENCODED_LEN {
9868            panic!(
9869                "buffer is too small (need {} bytes, but got {})",
9870                Self::ENCODED_LEN,
9871                __tmp.remaining(),
9872            )
9873        }
9874        __tmp.put_f32_le(self.param1);
9875        __tmp.put_f32_le(self.param2);
9876        __tmp.put_f32_le(self.param3);
9877        __tmp.put_f32_le(self.param4);
9878        __tmp.put_f32_le(self.param5);
9879        __tmp.put_f32_le(self.param6);
9880        __tmp.put_f32_le(self.param7);
9881        __tmp.put_u16_le(self.command as u16);
9882        __tmp.put_u8(self.target_system);
9883        __tmp.put_u8(self.target_component);
9884        __tmp.put_u8(self.confirmation);
9885        if matches!(version, MavlinkVersion::V2) {
9886            let len = __tmp.len();
9887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9888        } else {
9889            __tmp.len()
9890        }
9891    }
9892}
9893#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9894#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9895#[doc = ""]
9896#[doc = "ID: 395"]
9897#[derive(Debug, Clone, PartialEq)]
9898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9900#[cfg_attr(feature = "ts", derive(TS))]
9901#[cfg_attr(feature = "ts", ts(export))]
9902pub struct COMPONENT_INFORMATION_DATA {
9903    #[doc = "Timestamp (time since system boot)."]
9904    pub time_boot_ms: u32,
9905    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9906    pub general_metadata_file_crc: u32,
9907    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9908    pub peripherals_metadata_file_crc: u32,
9909    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9910    #[cfg_attr(feature = "ts", ts(type = "string"))]
9911    pub general_metadata_uri: CharArray<100>,
9912    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9913    #[cfg_attr(feature = "ts", ts(type = "string"))]
9914    pub peripherals_metadata_uri: CharArray<100>,
9915}
9916impl COMPONENT_INFORMATION_DATA {
9917    pub const ENCODED_LEN: usize = 212usize;
9918    pub const DEFAULT: Self = Self {
9919        time_boot_ms: 0_u32,
9920        general_metadata_file_crc: 0_u32,
9921        peripherals_metadata_file_crc: 0_u32,
9922        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9923        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9924    };
9925    #[cfg(feature = "arbitrary")]
9926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9927        use arbitrary::{Arbitrary, Unstructured};
9928        let mut buf = [0u8; 1024];
9929        rng.fill_bytes(&mut buf);
9930        let mut unstructured = Unstructured::new(&buf);
9931        Self::arbitrary(&mut unstructured).unwrap_or_default()
9932    }
9933}
9934impl Default for COMPONENT_INFORMATION_DATA {
9935    fn default() -> Self {
9936        Self::DEFAULT.clone()
9937    }
9938}
9939impl MessageData for COMPONENT_INFORMATION_DATA {
9940    type Message = MavMessage;
9941    const ID: u32 = 395u32;
9942    const NAME: &'static str = "COMPONENT_INFORMATION";
9943    const EXTRA_CRC: u8 = 0u8;
9944    const ENCODED_LEN: usize = 212usize;
9945    fn deser(
9946        _version: MavlinkVersion,
9947        __input: &[u8],
9948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9949        let avail_len = __input.len();
9950        let mut payload_buf = [0; Self::ENCODED_LEN];
9951        let mut buf = if avail_len < Self::ENCODED_LEN {
9952            payload_buf[0..avail_len].copy_from_slice(__input);
9953            Bytes::new(&payload_buf)
9954        } else {
9955            Bytes::new(__input)
9956        };
9957        let mut __struct = Self::default();
9958        __struct.time_boot_ms = buf.get_u32_le();
9959        __struct.general_metadata_file_crc = buf.get_u32_le();
9960        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9961        let mut tmp = [0_u8; 100usize];
9962        for v in &mut tmp {
9963            *v = buf.get_u8();
9964        }
9965        __struct.general_metadata_uri = CharArray::new(tmp);
9966        let mut tmp = [0_u8; 100usize];
9967        for v in &mut tmp {
9968            *v = buf.get_u8();
9969        }
9970        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9971        Ok(__struct)
9972    }
9973    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9974        let mut __tmp = BytesMut::new(bytes);
9975        #[allow(clippy::absurd_extreme_comparisons)]
9976        #[allow(unused_comparisons)]
9977        if __tmp.remaining() < Self::ENCODED_LEN {
9978            panic!(
9979                "buffer is too small (need {} bytes, but got {})",
9980                Self::ENCODED_LEN,
9981                __tmp.remaining(),
9982            )
9983        }
9984        __tmp.put_u32_le(self.time_boot_ms);
9985        __tmp.put_u32_le(self.general_metadata_file_crc);
9986        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9987        for val in &self.general_metadata_uri {
9988            __tmp.put_u8(*val);
9989        }
9990        for val in &self.peripherals_metadata_uri {
9991            __tmp.put_u8(*val);
9992        }
9993        if matches!(version, MavlinkVersion::V2) {
9994            let len = __tmp.len();
9995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9996        } else {
9997            __tmp.len()
9998        }
9999    }
10000}
10001#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10002#[doc = ""]
10003#[doc = "ID: 396"]
10004#[derive(Debug, Clone, PartialEq)]
10005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10007#[cfg_attr(feature = "ts", derive(TS))]
10008#[cfg_attr(feature = "ts", ts(export))]
10009pub struct COMPONENT_INFORMATION_BASIC_DATA {
10010    #[doc = "Component capability flags"]
10011    pub capabilities: MavProtocolCapability,
10012    #[doc = "Timestamp (time since system boot)."]
10013    pub time_boot_ms: u32,
10014    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10015    pub time_manufacture_s: u32,
10016    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10017    #[cfg_attr(feature = "ts", ts(type = "string"))]
10018    pub vendor_name: CharArray<32>,
10019    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10020    #[cfg_attr(feature = "ts", ts(type = "string"))]
10021    pub model_name: CharArray<32>,
10022    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10023    #[cfg_attr(feature = "ts", ts(type = "string"))]
10024    pub software_version: CharArray<24>,
10025    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10026    #[cfg_attr(feature = "ts", ts(type = "string"))]
10027    pub hardware_version: CharArray<24>,
10028    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10029    #[cfg_attr(feature = "ts", ts(type = "string"))]
10030    pub serial_number: CharArray<32>,
10031}
10032impl COMPONENT_INFORMATION_BASIC_DATA {
10033    pub const ENCODED_LEN: usize = 160usize;
10034    pub const DEFAULT: Self = Self {
10035        capabilities: MavProtocolCapability::DEFAULT,
10036        time_boot_ms: 0_u32,
10037        time_manufacture_s: 0_u32,
10038        vendor_name: CharArray::new([0_u8; 32usize]),
10039        model_name: CharArray::new([0_u8; 32usize]),
10040        software_version: CharArray::new([0_u8; 24usize]),
10041        hardware_version: CharArray::new([0_u8; 24usize]),
10042        serial_number: CharArray::new([0_u8; 32usize]),
10043    };
10044    #[cfg(feature = "arbitrary")]
10045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10046        use arbitrary::{Arbitrary, Unstructured};
10047        let mut buf = [0u8; 1024];
10048        rng.fill_bytes(&mut buf);
10049        let mut unstructured = Unstructured::new(&buf);
10050        Self::arbitrary(&mut unstructured).unwrap_or_default()
10051    }
10052}
10053impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10054    fn default() -> Self {
10055        Self::DEFAULT.clone()
10056    }
10057}
10058impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10059    type Message = MavMessage;
10060    const ID: u32 = 396u32;
10061    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10062    const EXTRA_CRC: u8 = 50u8;
10063    const ENCODED_LEN: usize = 160usize;
10064    fn deser(
10065        _version: MavlinkVersion,
10066        __input: &[u8],
10067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10068        let avail_len = __input.len();
10069        let mut payload_buf = [0; Self::ENCODED_LEN];
10070        let mut buf = if avail_len < Self::ENCODED_LEN {
10071            payload_buf[0..avail_len].copy_from_slice(__input);
10072            Bytes::new(&payload_buf)
10073        } else {
10074            Bytes::new(__input)
10075        };
10076        let mut __struct = Self::default();
10077        let tmp = buf.get_u64_le();
10078        __struct.capabilities = MavProtocolCapability::from_bits(
10079            tmp & MavProtocolCapability::all().bits(),
10080        )
10081        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10082            flag_type: "MavProtocolCapability",
10083            value: tmp as u32,
10084        })?;
10085        __struct.time_boot_ms = buf.get_u32_le();
10086        __struct.time_manufacture_s = buf.get_u32_le();
10087        let mut tmp = [0_u8; 32usize];
10088        for v in &mut tmp {
10089            *v = buf.get_u8();
10090        }
10091        __struct.vendor_name = CharArray::new(tmp);
10092        let mut tmp = [0_u8; 32usize];
10093        for v in &mut tmp {
10094            *v = buf.get_u8();
10095        }
10096        __struct.model_name = CharArray::new(tmp);
10097        let mut tmp = [0_u8; 24usize];
10098        for v in &mut tmp {
10099            *v = buf.get_u8();
10100        }
10101        __struct.software_version = CharArray::new(tmp);
10102        let mut tmp = [0_u8; 24usize];
10103        for v in &mut tmp {
10104            *v = buf.get_u8();
10105        }
10106        __struct.hardware_version = CharArray::new(tmp);
10107        let mut tmp = [0_u8; 32usize];
10108        for v in &mut tmp {
10109            *v = buf.get_u8();
10110        }
10111        __struct.serial_number = CharArray::new(tmp);
10112        Ok(__struct)
10113    }
10114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10115        let mut __tmp = BytesMut::new(bytes);
10116        #[allow(clippy::absurd_extreme_comparisons)]
10117        #[allow(unused_comparisons)]
10118        if __tmp.remaining() < Self::ENCODED_LEN {
10119            panic!(
10120                "buffer is too small (need {} bytes, but got {})",
10121                Self::ENCODED_LEN,
10122                __tmp.remaining(),
10123            )
10124        }
10125        __tmp.put_u64_le(self.capabilities.bits());
10126        __tmp.put_u32_le(self.time_boot_ms);
10127        __tmp.put_u32_le(self.time_manufacture_s);
10128        for val in &self.vendor_name {
10129            __tmp.put_u8(*val);
10130        }
10131        for val in &self.model_name {
10132            __tmp.put_u8(*val);
10133        }
10134        for val in &self.software_version {
10135            __tmp.put_u8(*val);
10136        }
10137        for val in &self.hardware_version {
10138            __tmp.put_u8(*val);
10139        }
10140        for val in &self.serial_number {
10141            __tmp.put_u8(*val);
10142        }
10143        if matches!(version, MavlinkVersion::V2) {
10144            let len = __tmp.len();
10145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10146        } else {
10147            __tmp.len()
10148        }
10149    }
10150}
10151#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10152#[doc = ""]
10153#[doc = "ID: 397"]
10154#[derive(Debug, Clone, PartialEq)]
10155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10157#[cfg_attr(feature = "ts", derive(TS))]
10158#[cfg_attr(feature = "ts", ts(export))]
10159pub struct COMPONENT_METADATA_DATA {
10160    #[doc = "Timestamp (time since system boot)."]
10161    pub time_boot_ms: u32,
10162    #[doc = "CRC32 of the general metadata file."]
10163    pub file_crc: u32,
10164    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10165    #[cfg_attr(feature = "ts", ts(type = "string"))]
10166    pub uri: CharArray<100>,
10167}
10168impl COMPONENT_METADATA_DATA {
10169    pub const ENCODED_LEN: usize = 108usize;
10170    pub const DEFAULT: Self = Self {
10171        time_boot_ms: 0_u32,
10172        file_crc: 0_u32,
10173        uri: CharArray::new([0_u8; 100usize]),
10174    };
10175    #[cfg(feature = "arbitrary")]
10176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10177        use arbitrary::{Arbitrary, Unstructured};
10178        let mut buf = [0u8; 1024];
10179        rng.fill_bytes(&mut buf);
10180        let mut unstructured = Unstructured::new(&buf);
10181        Self::arbitrary(&mut unstructured).unwrap_or_default()
10182    }
10183}
10184impl Default for COMPONENT_METADATA_DATA {
10185    fn default() -> Self {
10186        Self::DEFAULT.clone()
10187    }
10188}
10189impl MessageData for COMPONENT_METADATA_DATA {
10190    type Message = MavMessage;
10191    const ID: u32 = 397u32;
10192    const NAME: &'static str = "COMPONENT_METADATA";
10193    const EXTRA_CRC: u8 = 182u8;
10194    const ENCODED_LEN: usize = 108usize;
10195    fn deser(
10196        _version: MavlinkVersion,
10197        __input: &[u8],
10198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10199        let avail_len = __input.len();
10200        let mut payload_buf = [0; Self::ENCODED_LEN];
10201        let mut buf = if avail_len < Self::ENCODED_LEN {
10202            payload_buf[0..avail_len].copy_from_slice(__input);
10203            Bytes::new(&payload_buf)
10204        } else {
10205            Bytes::new(__input)
10206        };
10207        let mut __struct = Self::default();
10208        __struct.time_boot_ms = buf.get_u32_le();
10209        __struct.file_crc = buf.get_u32_le();
10210        let mut tmp = [0_u8; 100usize];
10211        for v in &mut tmp {
10212            *v = buf.get_u8();
10213        }
10214        __struct.uri = CharArray::new(tmp);
10215        Ok(__struct)
10216    }
10217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10218        let mut __tmp = BytesMut::new(bytes);
10219        #[allow(clippy::absurd_extreme_comparisons)]
10220        #[allow(unused_comparisons)]
10221        if __tmp.remaining() < Self::ENCODED_LEN {
10222            panic!(
10223                "buffer is too small (need {} bytes, but got {})",
10224                Self::ENCODED_LEN,
10225                __tmp.remaining(),
10226            )
10227        }
10228        __tmp.put_u32_le(self.time_boot_ms);
10229        __tmp.put_u32_le(self.file_crc);
10230        for val in &self.uri {
10231            __tmp.put_u8(*val);
10232        }
10233        if matches!(version, MavlinkVersion::V2) {
10234            let len = __tmp.len();
10235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10236        } else {
10237            __tmp.len()
10238        }
10239    }
10240}
10241#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10242#[doc = ""]
10243#[doc = "ID: 146"]
10244#[derive(Debug, Clone, PartialEq)]
10245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10247#[cfg_attr(feature = "ts", derive(TS))]
10248#[cfg_attr(feature = "ts", ts(export))]
10249pub struct CONTROL_SYSTEM_STATE_DATA {
10250    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10251    pub time_usec: u64,
10252    #[doc = "X acceleration in body frame"]
10253    pub x_acc: f32,
10254    #[doc = "Y acceleration in body frame"]
10255    pub y_acc: f32,
10256    #[doc = "Z acceleration in body frame"]
10257    pub z_acc: f32,
10258    #[doc = "X velocity in body frame"]
10259    pub x_vel: f32,
10260    #[doc = "Y velocity in body frame"]
10261    pub y_vel: f32,
10262    #[doc = "Z velocity in body frame"]
10263    pub z_vel: f32,
10264    #[doc = "X position in local frame"]
10265    pub x_pos: f32,
10266    #[doc = "Y position in local frame"]
10267    pub y_pos: f32,
10268    #[doc = "Z position in local frame"]
10269    pub z_pos: f32,
10270    #[doc = "Airspeed, set to -1 if unknown"]
10271    pub airspeed: f32,
10272    #[doc = "Variance of body velocity estimate"]
10273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10274    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10275    pub vel_variance: [f32; 3],
10276    #[doc = "Variance in local position"]
10277    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10278    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10279    pub pos_variance: [f32; 3],
10280    #[doc = "The attitude, represented as Quaternion"]
10281    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10282    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10283    pub q: [f32; 4],
10284    #[doc = "Angular rate in roll axis"]
10285    pub roll_rate: f32,
10286    #[doc = "Angular rate in pitch axis"]
10287    pub pitch_rate: f32,
10288    #[doc = "Angular rate in yaw axis"]
10289    pub yaw_rate: f32,
10290}
10291impl CONTROL_SYSTEM_STATE_DATA {
10292    pub const ENCODED_LEN: usize = 100usize;
10293    pub const DEFAULT: Self = Self {
10294        time_usec: 0_u64,
10295        x_acc: 0.0_f32,
10296        y_acc: 0.0_f32,
10297        z_acc: 0.0_f32,
10298        x_vel: 0.0_f32,
10299        y_vel: 0.0_f32,
10300        z_vel: 0.0_f32,
10301        x_pos: 0.0_f32,
10302        y_pos: 0.0_f32,
10303        z_pos: 0.0_f32,
10304        airspeed: 0.0_f32,
10305        vel_variance: [0.0_f32; 3usize],
10306        pos_variance: [0.0_f32; 3usize],
10307        q: [0.0_f32; 4usize],
10308        roll_rate: 0.0_f32,
10309        pitch_rate: 0.0_f32,
10310        yaw_rate: 0.0_f32,
10311    };
10312    #[cfg(feature = "arbitrary")]
10313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10314        use arbitrary::{Arbitrary, Unstructured};
10315        let mut buf = [0u8; 1024];
10316        rng.fill_bytes(&mut buf);
10317        let mut unstructured = Unstructured::new(&buf);
10318        Self::arbitrary(&mut unstructured).unwrap_or_default()
10319    }
10320}
10321impl Default for CONTROL_SYSTEM_STATE_DATA {
10322    fn default() -> Self {
10323        Self::DEFAULT.clone()
10324    }
10325}
10326impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10327    type Message = MavMessage;
10328    const ID: u32 = 146u32;
10329    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10330    const EXTRA_CRC: u8 = 103u8;
10331    const ENCODED_LEN: usize = 100usize;
10332    fn deser(
10333        _version: MavlinkVersion,
10334        __input: &[u8],
10335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10336        let avail_len = __input.len();
10337        let mut payload_buf = [0; Self::ENCODED_LEN];
10338        let mut buf = if avail_len < Self::ENCODED_LEN {
10339            payload_buf[0..avail_len].copy_from_slice(__input);
10340            Bytes::new(&payload_buf)
10341        } else {
10342            Bytes::new(__input)
10343        };
10344        let mut __struct = Self::default();
10345        __struct.time_usec = buf.get_u64_le();
10346        __struct.x_acc = buf.get_f32_le();
10347        __struct.y_acc = buf.get_f32_le();
10348        __struct.z_acc = buf.get_f32_le();
10349        __struct.x_vel = buf.get_f32_le();
10350        __struct.y_vel = buf.get_f32_le();
10351        __struct.z_vel = buf.get_f32_le();
10352        __struct.x_pos = buf.get_f32_le();
10353        __struct.y_pos = buf.get_f32_le();
10354        __struct.z_pos = buf.get_f32_le();
10355        __struct.airspeed = buf.get_f32_le();
10356        for v in &mut __struct.vel_variance {
10357            let val = buf.get_f32_le();
10358            *v = val;
10359        }
10360        for v in &mut __struct.pos_variance {
10361            let val = buf.get_f32_le();
10362            *v = val;
10363        }
10364        for v in &mut __struct.q {
10365            let val = buf.get_f32_le();
10366            *v = val;
10367        }
10368        __struct.roll_rate = buf.get_f32_le();
10369        __struct.pitch_rate = buf.get_f32_le();
10370        __struct.yaw_rate = buf.get_f32_le();
10371        Ok(__struct)
10372    }
10373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10374        let mut __tmp = BytesMut::new(bytes);
10375        #[allow(clippy::absurd_extreme_comparisons)]
10376        #[allow(unused_comparisons)]
10377        if __tmp.remaining() < Self::ENCODED_LEN {
10378            panic!(
10379                "buffer is too small (need {} bytes, but got {})",
10380                Self::ENCODED_LEN,
10381                __tmp.remaining(),
10382            )
10383        }
10384        __tmp.put_u64_le(self.time_usec);
10385        __tmp.put_f32_le(self.x_acc);
10386        __tmp.put_f32_le(self.y_acc);
10387        __tmp.put_f32_le(self.z_acc);
10388        __tmp.put_f32_le(self.x_vel);
10389        __tmp.put_f32_le(self.y_vel);
10390        __tmp.put_f32_le(self.z_vel);
10391        __tmp.put_f32_le(self.x_pos);
10392        __tmp.put_f32_le(self.y_pos);
10393        __tmp.put_f32_le(self.z_pos);
10394        __tmp.put_f32_le(self.airspeed);
10395        for val in &self.vel_variance {
10396            __tmp.put_f32_le(*val);
10397        }
10398        for val in &self.pos_variance {
10399            __tmp.put_f32_le(*val);
10400        }
10401        for val in &self.q {
10402            __tmp.put_f32_le(*val);
10403        }
10404        __tmp.put_f32_le(self.roll_rate);
10405        __tmp.put_f32_le(self.pitch_rate);
10406        __tmp.put_f32_le(self.yaw_rate);
10407        if matches!(version, MavlinkVersion::V2) {
10408            let len = __tmp.len();
10409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10410        } else {
10411            __tmp.len()
10412        }
10413    }
10414}
10415#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10416#[doc = ""]
10417#[doc = "ID: 411"]
10418#[derive(Debug, Clone, PartialEq)]
10419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10421#[cfg_attr(feature = "ts", derive(TS))]
10422#[cfg_attr(feature = "ts", ts(export))]
10423pub struct CURRENT_EVENT_SEQUENCE_DATA {
10424    #[doc = "Sequence number."]
10425    pub sequence: u16,
10426    #[doc = "Flag bitset."]
10427    pub flags: MavEventCurrentSequenceFlags,
10428}
10429impl CURRENT_EVENT_SEQUENCE_DATA {
10430    pub const ENCODED_LEN: usize = 3usize;
10431    pub const DEFAULT: Self = Self {
10432        sequence: 0_u16,
10433        flags: MavEventCurrentSequenceFlags::DEFAULT,
10434    };
10435    #[cfg(feature = "arbitrary")]
10436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10437        use arbitrary::{Arbitrary, Unstructured};
10438        let mut buf = [0u8; 1024];
10439        rng.fill_bytes(&mut buf);
10440        let mut unstructured = Unstructured::new(&buf);
10441        Self::arbitrary(&mut unstructured).unwrap_or_default()
10442    }
10443}
10444impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10445    fn default() -> Self {
10446        Self::DEFAULT.clone()
10447    }
10448}
10449impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10450    type Message = MavMessage;
10451    const ID: u32 = 411u32;
10452    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10453    const EXTRA_CRC: u8 = 106u8;
10454    const ENCODED_LEN: usize = 3usize;
10455    fn deser(
10456        _version: MavlinkVersion,
10457        __input: &[u8],
10458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10459        let avail_len = __input.len();
10460        let mut payload_buf = [0; Self::ENCODED_LEN];
10461        let mut buf = if avail_len < Self::ENCODED_LEN {
10462            payload_buf[0..avail_len].copy_from_slice(__input);
10463            Bytes::new(&payload_buf)
10464        } else {
10465            Bytes::new(__input)
10466        };
10467        let mut __struct = Self::default();
10468        __struct.sequence = buf.get_u16_le();
10469        let tmp = buf.get_u8();
10470        __struct.flags =
10471            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10472                enum_type: "MavEventCurrentSequenceFlags",
10473                value: tmp as u32,
10474            })?;
10475        Ok(__struct)
10476    }
10477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10478        let mut __tmp = BytesMut::new(bytes);
10479        #[allow(clippy::absurd_extreme_comparisons)]
10480        #[allow(unused_comparisons)]
10481        if __tmp.remaining() < Self::ENCODED_LEN {
10482            panic!(
10483                "buffer is too small (need {} bytes, but got {})",
10484                Self::ENCODED_LEN,
10485                __tmp.remaining(),
10486            )
10487        }
10488        __tmp.put_u16_le(self.sequence);
10489        __tmp.put_u8(self.flags as u8);
10490        if matches!(version, MavlinkVersion::V2) {
10491            let len = __tmp.len();
10492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10493        } else {
10494            __tmp.len()
10495        }
10496    }
10497}
10498#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10499#[doc = ""]
10500#[doc = "ID: 436"]
10501#[derive(Debug, Clone, PartialEq)]
10502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10504#[cfg_attr(feature = "ts", derive(TS))]
10505#[cfg_attr(feature = "ts", ts(export))]
10506pub struct CURRENT_MODE_DATA {
10507    #[doc = "A bitfield for use for autopilot-specific flags"]
10508    pub custom_mode: u32,
10509    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10510    pub intended_custom_mode: u32,
10511    #[doc = "Standard mode."]
10512    pub standard_mode: MavStandardMode,
10513}
10514impl CURRENT_MODE_DATA {
10515    pub const ENCODED_LEN: usize = 9usize;
10516    pub const DEFAULT: Self = Self {
10517        custom_mode: 0_u32,
10518        intended_custom_mode: 0_u32,
10519        standard_mode: MavStandardMode::DEFAULT,
10520    };
10521    #[cfg(feature = "arbitrary")]
10522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10523        use arbitrary::{Arbitrary, Unstructured};
10524        let mut buf = [0u8; 1024];
10525        rng.fill_bytes(&mut buf);
10526        let mut unstructured = Unstructured::new(&buf);
10527        Self::arbitrary(&mut unstructured).unwrap_or_default()
10528    }
10529}
10530impl Default for CURRENT_MODE_DATA {
10531    fn default() -> Self {
10532        Self::DEFAULT.clone()
10533    }
10534}
10535impl MessageData for CURRENT_MODE_DATA {
10536    type Message = MavMessage;
10537    const ID: u32 = 436u32;
10538    const NAME: &'static str = "CURRENT_MODE";
10539    const EXTRA_CRC: u8 = 193u8;
10540    const ENCODED_LEN: usize = 9usize;
10541    fn deser(
10542        _version: MavlinkVersion,
10543        __input: &[u8],
10544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10545        let avail_len = __input.len();
10546        let mut payload_buf = [0; Self::ENCODED_LEN];
10547        let mut buf = if avail_len < Self::ENCODED_LEN {
10548            payload_buf[0..avail_len].copy_from_slice(__input);
10549            Bytes::new(&payload_buf)
10550        } else {
10551            Bytes::new(__input)
10552        };
10553        let mut __struct = Self::default();
10554        __struct.custom_mode = buf.get_u32_le();
10555        __struct.intended_custom_mode = buf.get_u32_le();
10556        let tmp = buf.get_u8();
10557        __struct.standard_mode =
10558            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10559                enum_type: "MavStandardMode",
10560                value: tmp as u32,
10561            })?;
10562        Ok(__struct)
10563    }
10564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10565        let mut __tmp = BytesMut::new(bytes);
10566        #[allow(clippy::absurd_extreme_comparisons)]
10567        #[allow(unused_comparisons)]
10568        if __tmp.remaining() < Self::ENCODED_LEN {
10569            panic!(
10570                "buffer is too small (need {} bytes, but got {})",
10571                Self::ENCODED_LEN,
10572                __tmp.remaining(),
10573            )
10574        }
10575        __tmp.put_u32_le(self.custom_mode);
10576        __tmp.put_u32_le(self.intended_custom_mode);
10577        __tmp.put_u8(self.standard_mode as u8);
10578        if matches!(version, MavlinkVersion::V2) {
10579            let len = __tmp.len();
10580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10581        } else {
10582            __tmp.len()
10583        }
10584    }
10585}
10586#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10587#[doc = "Data stream status information."]
10588#[doc = ""]
10589#[doc = "ID: 67"]
10590#[derive(Debug, Clone, PartialEq)]
10591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10593#[cfg_attr(feature = "ts", derive(TS))]
10594#[cfg_attr(feature = "ts", ts(export))]
10595pub struct DATA_STREAM_DATA {
10596    #[doc = "The message rate"]
10597    pub message_rate: u16,
10598    #[doc = "The ID of the requested data stream"]
10599    pub stream_id: u8,
10600    #[doc = "1 stream is enabled, 0 stream is stopped."]
10601    pub on_off: u8,
10602}
10603impl DATA_STREAM_DATA {
10604    pub const ENCODED_LEN: usize = 4usize;
10605    pub const DEFAULT: Self = Self {
10606        message_rate: 0_u16,
10607        stream_id: 0_u8,
10608        on_off: 0_u8,
10609    };
10610    #[cfg(feature = "arbitrary")]
10611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10612        use arbitrary::{Arbitrary, Unstructured};
10613        let mut buf = [0u8; 1024];
10614        rng.fill_bytes(&mut buf);
10615        let mut unstructured = Unstructured::new(&buf);
10616        Self::arbitrary(&mut unstructured).unwrap_or_default()
10617    }
10618}
10619impl Default for DATA_STREAM_DATA {
10620    fn default() -> Self {
10621        Self::DEFAULT.clone()
10622    }
10623}
10624impl MessageData for DATA_STREAM_DATA {
10625    type Message = MavMessage;
10626    const ID: u32 = 67u32;
10627    const NAME: &'static str = "DATA_STREAM";
10628    const EXTRA_CRC: u8 = 21u8;
10629    const ENCODED_LEN: usize = 4usize;
10630    fn deser(
10631        _version: MavlinkVersion,
10632        __input: &[u8],
10633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10634        let avail_len = __input.len();
10635        let mut payload_buf = [0; Self::ENCODED_LEN];
10636        let mut buf = if avail_len < Self::ENCODED_LEN {
10637            payload_buf[0..avail_len].copy_from_slice(__input);
10638            Bytes::new(&payload_buf)
10639        } else {
10640            Bytes::new(__input)
10641        };
10642        let mut __struct = Self::default();
10643        __struct.message_rate = buf.get_u16_le();
10644        __struct.stream_id = buf.get_u8();
10645        __struct.on_off = buf.get_u8();
10646        Ok(__struct)
10647    }
10648    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10649        let mut __tmp = BytesMut::new(bytes);
10650        #[allow(clippy::absurd_extreme_comparisons)]
10651        #[allow(unused_comparisons)]
10652        if __tmp.remaining() < Self::ENCODED_LEN {
10653            panic!(
10654                "buffer is too small (need {} bytes, but got {})",
10655                Self::ENCODED_LEN,
10656                __tmp.remaining(),
10657            )
10658        }
10659        __tmp.put_u16_le(self.message_rate);
10660        __tmp.put_u8(self.stream_id);
10661        __tmp.put_u8(self.on_off);
10662        if matches!(version, MavlinkVersion::V2) {
10663            let len = __tmp.len();
10664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10665        } else {
10666            __tmp.len()
10667        }
10668    }
10669}
10670#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10671#[doc = ""]
10672#[doc = "ID: 130"]
10673#[derive(Debug, Clone, PartialEq)]
10674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10676#[cfg_attr(feature = "ts", derive(TS))]
10677#[cfg_attr(feature = "ts", ts(export))]
10678pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10679    #[doc = "total data size (set on ACK only)."]
10680    pub size: u32,
10681    #[doc = "Width of a matrix or image."]
10682    pub width: u16,
10683    #[doc = "Height of a matrix or image."]
10684    pub height: u16,
10685    #[doc = "Number of packets being sent (set on ACK only)."]
10686    pub packets: u16,
10687    #[doc = "Type of requested/acknowledged data."]
10688    pub mavtype: MavlinkDataStreamType,
10689    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10690    pub payload: u8,
10691    #[doc = "JPEG quality. Values: [1-100]."]
10692    pub jpg_quality: u8,
10693}
10694impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10695    pub const ENCODED_LEN: usize = 13usize;
10696    pub const DEFAULT: Self = Self {
10697        size: 0_u32,
10698        width: 0_u16,
10699        height: 0_u16,
10700        packets: 0_u16,
10701        mavtype: MavlinkDataStreamType::DEFAULT,
10702        payload: 0_u8,
10703        jpg_quality: 0_u8,
10704    };
10705    #[cfg(feature = "arbitrary")]
10706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10707        use arbitrary::{Arbitrary, Unstructured};
10708        let mut buf = [0u8; 1024];
10709        rng.fill_bytes(&mut buf);
10710        let mut unstructured = Unstructured::new(&buf);
10711        Self::arbitrary(&mut unstructured).unwrap_or_default()
10712    }
10713}
10714impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10715    fn default() -> Self {
10716        Self::DEFAULT.clone()
10717    }
10718}
10719impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10720    type Message = MavMessage;
10721    const ID: u32 = 130u32;
10722    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10723    const EXTRA_CRC: u8 = 29u8;
10724    const ENCODED_LEN: usize = 13usize;
10725    fn deser(
10726        _version: MavlinkVersion,
10727        __input: &[u8],
10728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10729        let avail_len = __input.len();
10730        let mut payload_buf = [0; Self::ENCODED_LEN];
10731        let mut buf = if avail_len < Self::ENCODED_LEN {
10732            payload_buf[0..avail_len].copy_from_slice(__input);
10733            Bytes::new(&payload_buf)
10734        } else {
10735            Bytes::new(__input)
10736        };
10737        let mut __struct = Self::default();
10738        __struct.size = buf.get_u32_le();
10739        __struct.width = buf.get_u16_le();
10740        __struct.height = buf.get_u16_le();
10741        __struct.packets = buf.get_u16_le();
10742        let tmp = buf.get_u8();
10743        __struct.mavtype =
10744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10745                enum_type: "MavlinkDataStreamType",
10746                value: tmp as u32,
10747            })?;
10748        __struct.payload = buf.get_u8();
10749        __struct.jpg_quality = buf.get_u8();
10750        Ok(__struct)
10751    }
10752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10753        let mut __tmp = BytesMut::new(bytes);
10754        #[allow(clippy::absurd_extreme_comparisons)]
10755        #[allow(unused_comparisons)]
10756        if __tmp.remaining() < Self::ENCODED_LEN {
10757            panic!(
10758                "buffer is too small (need {} bytes, but got {})",
10759                Self::ENCODED_LEN,
10760                __tmp.remaining(),
10761            )
10762        }
10763        __tmp.put_u32_le(self.size);
10764        __tmp.put_u16_le(self.width);
10765        __tmp.put_u16_le(self.height);
10766        __tmp.put_u16_le(self.packets);
10767        __tmp.put_u8(self.mavtype as u8);
10768        __tmp.put_u8(self.payload);
10769        __tmp.put_u8(self.jpg_quality);
10770        if matches!(version, MavlinkVersion::V2) {
10771            let len = __tmp.len();
10772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10773        } else {
10774            __tmp.len()
10775        }
10776    }
10777}
10778#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10779#[doc = ""]
10780#[doc = "ID: 254"]
10781#[derive(Debug, Clone, PartialEq)]
10782#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10784#[cfg_attr(feature = "ts", derive(TS))]
10785#[cfg_attr(feature = "ts", ts(export))]
10786pub struct DEBUG_DATA {
10787    #[doc = "Timestamp (time since system boot)."]
10788    pub time_boot_ms: u32,
10789    #[doc = "DEBUG value"]
10790    pub value: f32,
10791    #[doc = "index of debug variable"]
10792    pub ind: u8,
10793}
10794impl DEBUG_DATA {
10795    pub const ENCODED_LEN: usize = 9usize;
10796    pub const DEFAULT: Self = Self {
10797        time_boot_ms: 0_u32,
10798        value: 0.0_f32,
10799        ind: 0_u8,
10800    };
10801    #[cfg(feature = "arbitrary")]
10802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10803        use arbitrary::{Arbitrary, Unstructured};
10804        let mut buf = [0u8; 1024];
10805        rng.fill_bytes(&mut buf);
10806        let mut unstructured = Unstructured::new(&buf);
10807        Self::arbitrary(&mut unstructured).unwrap_or_default()
10808    }
10809}
10810impl Default for DEBUG_DATA {
10811    fn default() -> Self {
10812        Self::DEFAULT.clone()
10813    }
10814}
10815impl MessageData for DEBUG_DATA {
10816    type Message = MavMessage;
10817    const ID: u32 = 254u32;
10818    const NAME: &'static str = "DEBUG";
10819    const EXTRA_CRC: u8 = 46u8;
10820    const ENCODED_LEN: usize = 9usize;
10821    fn deser(
10822        _version: MavlinkVersion,
10823        __input: &[u8],
10824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10825        let avail_len = __input.len();
10826        let mut payload_buf = [0; Self::ENCODED_LEN];
10827        let mut buf = if avail_len < Self::ENCODED_LEN {
10828            payload_buf[0..avail_len].copy_from_slice(__input);
10829            Bytes::new(&payload_buf)
10830        } else {
10831            Bytes::new(__input)
10832        };
10833        let mut __struct = Self::default();
10834        __struct.time_boot_ms = buf.get_u32_le();
10835        __struct.value = buf.get_f32_le();
10836        __struct.ind = buf.get_u8();
10837        Ok(__struct)
10838    }
10839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10840        let mut __tmp = BytesMut::new(bytes);
10841        #[allow(clippy::absurd_extreme_comparisons)]
10842        #[allow(unused_comparisons)]
10843        if __tmp.remaining() < Self::ENCODED_LEN {
10844            panic!(
10845                "buffer is too small (need {} bytes, but got {})",
10846                Self::ENCODED_LEN,
10847                __tmp.remaining(),
10848            )
10849        }
10850        __tmp.put_u32_le(self.time_boot_ms);
10851        __tmp.put_f32_le(self.value);
10852        __tmp.put_u8(self.ind);
10853        if matches!(version, MavlinkVersion::V2) {
10854            let len = __tmp.len();
10855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10856        } else {
10857            __tmp.len()
10858        }
10859    }
10860}
10861#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10862#[doc = ""]
10863#[doc = "ID: 350"]
10864#[derive(Debug, Clone, PartialEq)]
10865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10867#[cfg_attr(feature = "ts", derive(TS))]
10868#[cfg_attr(feature = "ts", ts(export))]
10869pub struct DEBUG_FLOAT_ARRAY_DATA {
10870    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10871    pub time_usec: u64,
10872    #[doc = "Unique ID used to discriminate between arrays"]
10873    pub array_id: u16,
10874    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10875    #[cfg_attr(feature = "ts", ts(type = "string"))]
10876    pub name: CharArray<10>,
10877    #[doc = "data"]
10878    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10879    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10880    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10881    pub data: [f32; 58],
10882}
10883impl DEBUG_FLOAT_ARRAY_DATA {
10884    pub const ENCODED_LEN: usize = 252usize;
10885    pub const DEFAULT: Self = Self {
10886        time_usec: 0_u64,
10887        array_id: 0_u16,
10888        name: CharArray::new([0_u8; 10usize]),
10889        data: [0.0_f32; 58usize],
10890    };
10891    #[cfg(feature = "arbitrary")]
10892    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10893        use arbitrary::{Arbitrary, Unstructured};
10894        let mut buf = [0u8; 1024];
10895        rng.fill_bytes(&mut buf);
10896        let mut unstructured = Unstructured::new(&buf);
10897        Self::arbitrary(&mut unstructured).unwrap_or_default()
10898    }
10899}
10900impl Default for DEBUG_FLOAT_ARRAY_DATA {
10901    fn default() -> Self {
10902        Self::DEFAULT.clone()
10903    }
10904}
10905impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10906    type Message = MavMessage;
10907    const ID: u32 = 350u32;
10908    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10909    const EXTRA_CRC: u8 = 232u8;
10910    const ENCODED_LEN: usize = 252usize;
10911    fn deser(
10912        _version: MavlinkVersion,
10913        __input: &[u8],
10914    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10915        let avail_len = __input.len();
10916        let mut payload_buf = [0; Self::ENCODED_LEN];
10917        let mut buf = if avail_len < Self::ENCODED_LEN {
10918            payload_buf[0..avail_len].copy_from_slice(__input);
10919            Bytes::new(&payload_buf)
10920        } else {
10921            Bytes::new(__input)
10922        };
10923        let mut __struct = Self::default();
10924        __struct.time_usec = buf.get_u64_le();
10925        __struct.array_id = buf.get_u16_le();
10926        let mut tmp = [0_u8; 10usize];
10927        for v in &mut tmp {
10928            *v = buf.get_u8();
10929        }
10930        __struct.name = CharArray::new(tmp);
10931        for v in &mut __struct.data {
10932            let val = buf.get_f32_le();
10933            *v = val;
10934        }
10935        Ok(__struct)
10936    }
10937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10938        let mut __tmp = BytesMut::new(bytes);
10939        #[allow(clippy::absurd_extreme_comparisons)]
10940        #[allow(unused_comparisons)]
10941        if __tmp.remaining() < Self::ENCODED_LEN {
10942            panic!(
10943                "buffer is too small (need {} bytes, but got {})",
10944                Self::ENCODED_LEN,
10945                __tmp.remaining(),
10946            )
10947        }
10948        __tmp.put_u64_le(self.time_usec);
10949        __tmp.put_u16_le(self.array_id);
10950        for val in &self.name {
10951            __tmp.put_u8(*val);
10952        }
10953        if matches!(version, MavlinkVersion::V2) {
10954            for val in &self.data {
10955                __tmp.put_f32_le(*val);
10956            }
10957            let len = __tmp.len();
10958            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10959        } else {
10960            __tmp.len()
10961        }
10962    }
10963}
10964#[doc = "To debug something using a named 3D vector."]
10965#[doc = ""]
10966#[doc = "ID: 250"]
10967#[derive(Debug, Clone, PartialEq)]
10968#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10969#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10970#[cfg_attr(feature = "ts", derive(TS))]
10971#[cfg_attr(feature = "ts", ts(export))]
10972pub struct DEBUG_VECT_DATA {
10973    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10974    pub time_usec: u64,
10975    #[doc = "x"]
10976    pub x: f32,
10977    #[doc = "y"]
10978    pub y: f32,
10979    #[doc = "z"]
10980    pub z: f32,
10981    #[doc = "Name"]
10982    #[cfg_attr(feature = "ts", ts(type = "string"))]
10983    pub name: CharArray<10>,
10984}
10985impl DEBUG_VECT_DATA {
10986    pub const ENCODED_LEN: usize = 30usize;
10987    pub const DEFAULT: Self = Self {
10988        time_usec: 0_u64,
10989        x: 0.0_f32,
10990        y: 0.0_f32,
10991        z: 0.0_f32,
10992        name: CharArray::new([0_u8; 10usize]),
10993    };
10994    #[cfg(feature = "arbitrary")]
10995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10996        use arbitrary::{Arbitrary, Unstructured};
10997        let mut buf = [0u8; 1024];
10998        rng.fill_bytes(&mut buf);
10999        let mut unstructured = Unstructured::new(&buf);
11000        Self::arbitrary(&mut unstructured).unwrap_or_default()
11001    }
11002}
11003impl Default for DEBUG_VECT_DATA {
11004    fn default() -> Self {
11005        Self::DEFAULT.clone()
11006    }
11007}
11008impl MessageData for DEBUG_VECT_DATA {
11009    type Message = MavMessage;
11010    const ID: u32 = 250u32;
11011    const NAME: &'static str = "DEBUG_VECT";
11012    const EXTRA_CRC: u8 = 49u8;
11013    const ENCODED_LEN: usize = 30usize;
11014    fn deser(
11015        _version: MavlinkVersion,
11016        __input: &[u8],
11017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11018        let avail_len = __input.len();
11019        let mut payload_buf = [0; Self::ENCODED_LEN];
11020        let mut buf = if avail_len < Self::ENCODED_LEN {
11021            payload_buf[0..avail_len].copy_from_slice(__input);
11022            Bytes::new(&payload_buf)
11023        } else {
11024            Bytes::new(__input)
11025        };
11026        let mut __struct = Self::default();
11027        __struct.time_usec = buf.get_u64_le();
11028        __struct.x = buf.get_f32_le();
11029        __struct.y = buf.get_f32_le();
11030        __struct.z = buf.get_f32_le();
11031        let mut tmp = [0_u8; 10usize];
11032        for v in &mut tmp {
11033            *v = buf.get_u8();
11034        }
11035        __struct.name = CharArray::new(tmp);
11036        Ok(__struct)
11037    }
11038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11039        let mut __tmp = BytesMut::new(bytes);
11040        #[allow(clippy::absurd_extreme_comparisons)]
11041        #[allow(unused_comparisons)]
11042        if __tmp.remaining() < Self::ENCODED_LEN {
11043            panic!(
11044                "buffer is too small (need {} bytes, but got {})",
11045                Self::ENCODED_LEN,
11046                __tmp.remaining(),
11047            )
11048        }
11049        __tmp.put_u64_le(self.time_usec);
11050        __tmp.put_f32_le(self.x);
11051        __tmp.put_f32_le(self.y);
11052        __tmp.put_f32_le(self.z);
11053        for val in &self.name {
11054            __tmp.put_u8(*val);
11055        }
11056        if matches!(version, MavlinkVersion::V2) {
11057            let len = __tmp.len();
11058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11059        } else {
11060            __tmp.len()
11061        }
11062    }
11063}
11064#[doc = "Distance sensor information for an onboard rangefinder."]
11065#[doc = ""]
11066#[doc = "ID: 132"]
11067#[derive(Debug, Clone, PartialEq)]
11068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11070#[cfg_attr(feature = "ts", derive(TS))]
11071#[cfg_attr(feature = "ts", ts(export))]
11072pub struct DISTANCE_SENSOR_DATA {
11073    #[doc = "Timestamp (time since system boot)."]
11074    pub time_boot_ms: u32,
11075    #[doc = "Minimum distance the sensor can measure"]
11076    pub min_distance: u16,
11077    #[doc = "Maximum distance the sensor can measure"]
11078    pub max_distance: u16,
11079    #[doc = "Current distance reading"]
11080    pub current_distance: u16,
11081    #[doc = "Type of distance sensor."]
11082    pub mavtype: MavDistanceSensor,
11083    #[doc = "Onboard ID of the sensor"]
11084    pub id: u8,
11085    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11086    pub orientation: MavSensorOrientation,
11087    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11088    pub covariance: u8,
11089    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11091    pub horizontal_fov: f32,
11092    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11093    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11094    pub vertical_fov: f32,
11095    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11097    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11098    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11099    pub quaternion: [f32; 4],
11100    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11102    pub signal_quality: u8,
11103}
11104impl DISTANCE_SENSOR_DATA {
11105    pub const ENCODED_LEN: usize = 39usize;
11106    pub const DEFAULT: Self = Self {
11107        time_boot_ms: 0_u32,
11108        min_distance: 0_u16,
11109        max_distance: 0_u16,
11110        current_distance: 0_u16,
11111        mavtype: MavDistanceSensor::DEFAULT,
11112        id: 0_u8,
11113        orientation: MavSensorOrientation::DEFAULT,
11114        covariance: 0_u8,
11115        horizontal_fov: 0.0_f32,
11116        vertical_fov: 0.0_f32,
11117        quaternion: [0.0_f32; 4usize],
11118        signal_quality: 0_u8,
11119    };
11120    #[cfg(feature = "arbitrary")]
11121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11122        use arbitrary::{Arbitrary, Unstructured};
11123        let mut buf = [0u8; 1024];
11124        rng.fill_bytes(&mut buf);
11125        let mut unstructured = Unstructured::new(&buf);
11126        Self::arbitrary(&mut unstructured).unwrap_or_default()
11127    }
11128}
11129impl Default for DISTANCE_SENSOR_DATA {
11130    fn default() -> Self {
11131        Self::DEFAULT.clone()
11132    }
11133}
11134impl MessageData for DISTANCE_SENSOR_DATA {
11135    type Message = MavMessage;
11136    const ID: u32 = 132u32;
11137    const NAME: &'static str = "DISTANCE_SENSOR";
11138    const EXTRA_CRC: u8 = 85u8;
11139    const ENCODED_LEN: usize = 39usize;
11140    fn deser(
11141        _version: MavlinkVersion,
11142        __input: &[u8],
11143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11144        let avail_len = __input.len();
11145        let mut payload_buf = [0; Self::ENCODED_LEN];
11146        let mut buf = if avail_len < Self::ENCODED_LEN {
11147            payload_buf[0..avail_len].copy_from_slice(__input);
11148            Bytes::new(&payload_buf)
11149        } else {
11150            Bytes::new(__input)
11151        };
11152        let mut __struct = Self::default();
11153        __struct.time_boot_ms = buf.get_u32_le();
11154        __struct.min_distance = buf.get_u16_le();
11155        __struct.max_distance = buf.get_u16_le();
11156        __struct.current_distance = buf.get_u16_le();
11157        let tmp = buf.get_u8();
11158        __struct.mavtype =
11159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11160                enum_type: "MavDistanceSensor",
11161                value: tmp as u32,
11162            })?;
11163        __struct.id = buf.get_u8();
11164        let tmp = buf.get_u8();
11165        __struct.orientation =
11166            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11167                enum_type: "MavSensorOrientation",
11168                value: tmp as u32,
11169            })?;
11170        __struct.covariance = buf.get_u8();
11171        __struct.horizontal_fov = buf.get_f32_le();
11172        __struct.vertical_fov = buf.get_f32_le();
11173        for v in &mut __struct.quaternion {
11174            let val = buf.get_f32_le();
11175            *v = val;
11176        }
11177        __struct.signal_quality = buf.get_u8();
11178        Ok(__struct)
11179    }
11180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11181        let mut __tmp = BytesMut::new(bytes);
11182        #[allow(clippy::absurd_extreme_comparisons)]
11183        #[allow(unused_comparisons)]
11184        if __tmp.remaining() < Self::ENCODED_LEN {
11185            panic!(
11186                "buffer is too small (need {} bytes, but got {})",
11187                Self::ENCODED_LEN,
11188                __tmp.remaining(),
11189            )
11190        }
11191        __tmp.put_u32_le(self.time_boot_ms);
11192        __tmp.put_u16_le(self.min_distance);
11193        __tmp.put_u16_le(self.max_distance);
11194        __tmp.put_u16_le(self.current_distance);
11195        __tmp.put_u8(self.mavtype as u8);
11196        __tmp.put_u8(self.id);
11197        __tmp.put_u8(self.orientation as u8);
11198        __tmp.put_u8(self.covariance);
11199        if matches!(version, MavlinkVersion::V2) {
11200            __tmp.put_f32_le(self.horizontal_fov);
11201            __tmp.put_f32_le(self.vertical_fov);
11202            for val in &self.quaternion {
11203                __tmp.put_f32_le(*val);
11204            }
11205            __tmp.put_u8(self.signal_quality);
11206            let len = __tmp.len();
11207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11208        } else {
11209            __tmp.len()
11210        }
11211    }
11212}
11213#[doc = "EFI status output."]
11214#[doc = ""]
11215#[doc = "ID: 225"]
11216#[derive(Debug, Clone, PartialEq)]
11217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11219#[cfg_attr(feature = "ts", derive(TS))]
11220#[cfg_attr(feature = "ts", ts(export))]
11221pub struct EFI_STATUS_DATA {
11222    #[doc = "ECU index"]
11223    pub ecu_index: f32,
11224    #[doc = "RPM"]
11225    pub rpm: f32,
11226    #[doc = "Fuel consumed"]
11227    pub fuel_consumed: f32,
11228    #[doc = "Fuel flow rate"]
11229    pub fuel_flow: f32,
11230    #[doc = "Engine load"]
11231    pub engine_load: f32,
11232    #[doc = "Throttle position"]
11233    pub throttle_position: f32,
11234    #[doc = "Spark dwell time"]
11235    pub spark_dwell_time: f32,
11236    #[doc = "Barometric pressure"]
11237    pub barometric_pressure: f32,
11238    #[doc = "Intake manifold pressure("]
11239    pub intake_manifold_pressure: f32,
11240    #[doc = "Intake manifold temperature"]
11241    pub intake_manifold_temperature: f32,
11242    #[doc = "Cylinder head temperature"]
11243    pub cylinder_head_temperature: f32,
11244    #[doc = "Ignition timing (Crank angle degrees)"]
11245    pub ignition_timing: f32,
11246    #[doc = "Injection time"]
11247    pub injection_time: f32,
11248    #[doc = "Exhaust gas temperature"]
11249    pub exhaust_gas_temperature: f32,
11250    #[doc = "Output throttle"]
11251    pub throttle_out: f32,
11252    #[doc = "Pressure/temperature compensation"]
11253    pub pt_compensation: f32,
11254    #[doc = "EFI health status"]
11255    pub health: u8,
11256    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11257    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11258    pub ignition_voltage: f32,
11259    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11260    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11261    pub fuel_pressure: f32,
11262}
11263impl EFI_STATUS_DATA {
11264    pub const ENCODED_LEN: usize = 73usize;
11265    pub const DEFAULT: Self = Self {
11266        ecu_index: 0.0_f32,
11267        rpm: 0.0_f32,
11268        fuel_consumed: 0.0_f32,
11269        fuel_flow: 0.0_f32,
11270        engine_load: 0.0_f32,
11271        throttle_position: 0.0_f32,
11272        spark_dwell_time: 0.0_f32,
11273        barometric_pressure: 0.0_f32,
11274        intake_manifold_pressure: 0.0_f32,
11275        intake_manifold_temperature: 0.0_f32,
11276        cylinder_head_temperature: 0.0_f32,
11277        ignition_timing: 0.0_f32,
11278        injection_time: 0.0_f32,
11279        exhaust_gas_temperature: 0.0_f32,
11280        throttle_out: 0.0_f32,
11281        pt_compensation: 0.0_f32,
11282        health: 0_u8,
11283        ignition_voltage: 0.0_f32,
11284        fuel_pressure: 0.0_f32,
11285    };
11286    #[cfg(feature = "arbitrary")]
11287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11288        use arbitrary::{Arbitrary, Unstructured};
11289        let mut buf = [0u8; 1024];
11290        rng.fill_bytes(&mut buf);
11291        let mut unstructured = Unstructured::new(&buf);
11292        Self::arbitrary(&mut unstructured).unwrap_or_default()
11293    }
11294}
11295impl Default for EFI_STATUS_DATA {
11296    fn default() -> Self {
11297        Self::DEFAULT.clone()
11298    }
11299}
11300impl MessageData for EFI_STATUS_DATA {
11301    type Message = MavMessage;
11302    const ID: u32 = 225u32;
11303    const NAME: &'static str = "EFI_STATUS";
11304    const EXTRA_CRC: u8 = 208u8;
11305    const ENCODED_LEN: usize = 73usize;
11306    fn deser(
11307        _version: MavlinkVersion,
11308        __input: &[u8],
11309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11310        let avail_len = __input.len();
11311        let mut payload_buf = [0; Self::ENCODED_LEN];
11312        let mut buf = if avail_len < Self::ENCODED_LEN {
11313            payload_buf[0..avail_len].copy_from_slice(__input);
11314            Bytes::new(&payload_buf)
11315        } else {
11316            Bytes::new(__input)
11317        };
11318        let mut __struct = Self::default();
11319        __struct.ecu_index = buf.get_f32_le();
11320        __struct.rpm = buf.get_f32_le();
11321        __struct.fuel_consumed = buf.get_f32_le();
11322        __struct.fuel_flow = buf.get_f32_le();
11323        __struct.engine_load = buf.get_f32_le();
11324        __struct.throttle_position = buf.get_f32_le();
11325        __struct.spark_dwell_time = buf.get_f32_le();
11326        __struct.barometric_pressure = buf.get_f32_le();
11327        __struct.intake_manifold_pressure = buf.get_f32_le();
11328        __struct.intake_manifold_temperature = buf.get_f32_le();
11329        __struct.cylinder_head_temperature = buf.get_f32_le();
11330        __struct.ignition_timing = buf.get_f32_le();
11331        __struct.injection_time = buf.get_f32_le();
11332        __struct.exhaust_gas_temperature = buf.get_f32_le();
11333        __struct.throttle_out = buf.get_f32_le();
11334        __struct.pt_compensation = buf.get_f32_le();
11335        __struct.health = buf.get_u8();
11336        __struct.ignition_voltage = buf.get_f32_le();
11337        __struct.fuel_pressure = buf.get_f32_le();
11338        Ok(__struct)
11339    }
11340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11341        let mut __tmp = BytesMut::new(bytes);
11342        #[allow(clippy::absurd_extreme_comparisons)]
11343        #[allow(unused_comparisons)]
11344        if __tmp.remaining() < Self::ENCODED_LEN {
11345            panic!(
11346                "buffer is too small (need {} bytes, but got {})",
11347                Self::ENCODED_LEN,
11348                __tmp.remaining(),
11349            )
11350        }
11351        __tmp.put_f32_le(self.ecu_index);
11352        __tmp.put_f32_le(self.rpm);
11353        __tmp.put_f32_le(self.fuel_consumed);
11354        __tmp.put_f32_le(self.fuel_flow);
11355        __tmp.put_f32_le(self.engine_load);
11356        __tmp.put_f32_le(self.throttle_position);
11357        __tmp.put_f32_le(self.spark_dwell_time);
11358        __tmp.put_f32_le(self.barometric_pressure);
11359        __tmp.put_f32_le(self.intake_manifold_pressure);
11360        __tmp.put_f32_le(self.intake_manifold_temperature);
11361        __tmp.put_f32_le(self.cylinder_head_temperature);
11362        __tmp.put_f32_le(self.ignition_timing);
11363        __tmp.put_f32_le(self.injection_time);
11364        __tmp.put_f32_le(self.exhaust_gas_temperature);
11365        __tmp.put_f32_le(self.throttle_out);
11366        __tmp.put_f32_le(self.pt_compensation);
11367        __tmp.put_u8(self.health);
11368        if matches!(version, MavlinkVersion::V2) {
11369            __tmp.put_f32_le(self.ignition_voltage);
11370            __tmp.put_f32_le(self.fuel_pressure);
11371            let len = __tmp.len();
11372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11373        } else {
11374            __tmp.len()
11375        }
11376    }
11377}
11378#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11379#[doc = ""]
11380#[doc = "ID: 131"]
11381#[derive(Debug, Clone, PartialEq)]
11382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11384#[cfg_attr(feature = "ts", derive(TS))]
11385#[cfg_attr(feature = "ts", ts(export))]
11386pub struct ENCAPSULATED_DATA_DATA {
11387    #[doc = "sequence number (starting with 0 on every transmission)"]
11388    pub seqnr: u16,
11389    #[doc = "image data bytes"]
11390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11391    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11392    pub data: [u8; 253],
11393}
11394impl ENCAPSULATED_DATA_DATA {
11395    pub const ENCODED_LEN: usize = 255usize;
11396    pub const DEFAULT: Self = Self {
11397        seqnr: 0_u16,
11398        data: [0_u8; 253usize],
11399    };
11400    #[cfg(feature = "arbitrary")]
11401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11402        use arbitrary::{Arbitrary, Unstructured};
11403        let mut buf = [0u8; 1024];
11404        rng.fill_bytes(&mut buf);
11405        let mut unstructured = Unstructured::new(&buf);
11406        Self::arbitrary(&mut unstructured).unwrap_or_default()
11407    }
11408}
11409impl Default for ENCAPSULATED_DATA_DATA {
11410    fn default() -> Self {
11411        Self::DEFAULT.clone()
11412    }
11413}
11414impl MessageData for ENCAPSULATED_DATA_DATA {
11415    type Message = MavMessage;
11416    const ID: u32 = 131u32;
11417    const NAME: &'static str = "ENCAPSULATED_DATA";
11418    const EXTRA_CRC: u8 = 223u8;
11419    const ENCODED_LEN: usize = 255usize;
11420    fn deser(
11421        _version: MavlinkVersion,
11422        __input: &[u8],
11423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11424        let avail_len = __input.len();
11425        let mut payload_buf = [0; Self::ENCODED_LEN];
11426        let mut buf = if avail_len < Self::ENCODED_LEN {
11427            payload_buf[0..avail_len].copy_from_slice(__input);
11428            Bytes::new(&payload_buf)
11429        } else {
11430            Bytes::new(__input)
11431        };
11432        let mut __struct = Self::default();
11433        __struct.seqnr = buf.get_u16_le();
11434        for v in &mut __struct.data {
11435            let val = buf.get_u8();
11436            *v = val;
11437        }
11438        Ok(__struct)
11439    }
11440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11441        let mut __tmp = BytesMut::new(bytes);
11442        #[allow(clippy::absurd_extreme_comparisons)]
11443        #[allow(unused_comparisons)]
11444        if __tmp.remaining() < Self::ENCODED_LEN {
11445            panic!(
11446                "buffer is too small (need {} bytes, but got {})",
11447                Self::ENCODED_LEN,
11448                __tmp.remaining(),
11449            )
11450        }
11451        __tmp.put_u16_le(self.seqnr);
11452        for val in &self.data {
11453            __tmp.put_u8(*val);
11454        }
11455        if matches!(version, MavlinkVersion::V2) {
11456            let len = __tmp.len();
11457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11458        } else {
11459            __tmp.len()
11460        }
11461    }
11462}
11463#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11464#[doc = ""]
11465#[doc = "ID: 290"]
11466#[derive(Debug, Clone, PartialEq)]
11467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11469#[cfg_attr(feature = "ts", derive(TS))]
11470#[cfg_attr(feature = "ts", ts(export))]
11471pub struct ESC_INFO_DATA {
11472    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11473    pub time_usec: u64,
11474    #[doc = "Number of reported errors by each ESC since boot."]
11475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11477    pub error_count: [u32; 4],
11478    #[doc = "Counter of data packets received."]
11479    pub counter: u16,
11480    #[doc = "Bitmap of ESC failure flags."]
11481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11482    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11483    pub failure_flags: [u16; 4],
11484    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11486    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11487    pub temperature: [i16; 4],
11488    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11489    pub index: u8,
11490    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11491    pub count: u8,
11492    #[doc = "Connection type protocol for all ESC."]
11493    pub connection_type: EscConnectionType,
11494    #[doc = "Information regarding online/offline status of each ESC."]
11495    pub info: u8,
11496}
11497impl ESC_INFO_DATA {
11498    pub const ENCODED_LEN: usize = 46usize;
11499    pub const DEFAULT: Self = Self {
11500        time_usec: 0_u64,
11501        error_count: [0_u32; 4usize],
11502        counter: 0_u16,
11503        failure_flags: [0_u16; 4usize],
11504        temperature: [0_i16; 4usize],
11505        index: 0_u8,
11506        count: 0_u8,
11507        connection_type: EscConnectionType::DEFAULT,
11508        info: 0_u8,
11509    };
11510    #[cfg(feature = "arbitrary")]
11511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11512        use arbitrary::{Arbitrary, Unstructured};
11513        let mut buf = [0u8; 1024];
11514        rng.fill_bytes(&mut buf);
11515        let mut unstructured = Unstructured::new(&buf);
11516        Self::arbitrary(&mut unstructured).unwrap_or_default()
11517    }
11518}
11519impl Default for ESC_INFO_DATA {
11520    fn default() -> Self {
11521        Self::DEFAULT.clone()
11522    }
11523}
11524impl MessageData for ESC_INFO_DATA {
11525    type Message = MavMessage;
11526    const ID: u32 = 290u32;
11527    const NAME: &'static str = "ESC_INFO";
11528    const EXTRA_CRC: u8 = 251u8;
11529    const ENCODED_LEN: usize = 46usize;
11530    fn deser(
11531        _version: MavlinkVersion,
11532        __input: &[u8],
11533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11534        let avail_len = __input.len();
11535        let mut payload_buf = [0; Self::ENCODED_LEN];
11536        let mut buf = if avail_len < Self::ENCODED_LEN {
11537            payload_buf[0..avail_len].copy_from_slice(__input);
11538            Bytes::new(&payload_buf)
11539        } else {
11540            Bytes::new(__input)
11541        };
11542        let mut __struct = Self::default();
11543        __struct.time_usec = buf.get_u64_le();
11544        for v in &mut __struct.error_count {
11545            let val = buf.get_u32_le();
11546            *v = val;
11547        }
11548        __struct.counter = buf.get_u16_le();
11549        for v in &mut __struct.failure_flags {
11550            let val = buf.get_u16_le();
11551            *v = val;
11552        }
11553        for v in &mut __struct.temperature {
11554            let val = buf.get_i16_le();
11555            *v = val;
11556        }
11557        __struct.index = buf.get_u8();
11558        __struct.count = buf.get_u8();
11559        let tmp = buf.get_u8();
11560        __struct.connection_type =
11561            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11562                enum_type: "EscConnectionType",
11563                value: tmp as u32,
11564            })?;
11565        __struct.info = buf.get_u8();
11566        Ok(__struct)
11567    }
11568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11569        let mut __tmp = BytesMut::new(bytes);
11570        #[allow(clippy::absurd_extreme_comparisons)]
11571        #[allow(unused_comparisons)]
11572        if __tmp.remaining() < Self::ENCODED_LEN {
11573            panic!(
11574                "buffer is too small (need {} bytes, but got {})",
11575                Self::ENCODED_LEN,
11576                __tmp.remaining(),
11577            )
11578        }
11579        __tmp.put_u64_le(self.time_usec);
11580        for val in &self.error_count {
11581            __tmp.put_u32_le(*val);
11582        }
11583        __tmp.put_u16_le(self.counter);
11584        for val in &self.failure_flags {
11585            __tmp.put_u16_le(*val);
11586        }
11587        for val in &self.temperature {
11588            __tmp.put_i16_le(*val);
11589        }
11590        __tmp.put_u8(self.index);
11591        __tmp.put_u8(self.count);
11592        __tmp.put_u8(self.connection_type as u8);
11593        __tmp.put_u8(self.info);
11594        if matches!(version, MavlinkVersion::V2) {
11595            let len = __tmp.len();
11596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11597        } else {
11598            __tmp.len()
11599        }
11600    }
11601}
11602#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11603#[doc = ""]
11604#[doc = "ID: 291"]
11605#[derive(Debug, Clone, PartialEq)]
11606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11608#[cfg_attr(feature = "ts", derive(TS))]
11609#[cfg_attr(feature = "ts", ts(export))]
11610pub struct ESC_STATUS_DATA {
11611    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11612    pub time_usec: u64,
11613    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11615    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11616    pub rpm: [i32; 4],
11617    #[doc = "Voltage measured from each ESC."]
11618    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11619    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11620    pub voltage: [f32; 4],
11621    #[doc = "Current measured from each ESC."]
11622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11623    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11624    pub current: [f32; 4],
11625    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11626    pub index: u8,
11627}
11628impl ESC_STATUS_DATA {
11629    pub const ENCODED_LEN: usize = 57usize;
11630    pub const DEFAULT: Self = Self {
11631        time_usec: 0_u64,
11632        rpm: [0_i32; 4usize],
11633        voltage: [0.0_f32; 4usize],
11634        current: [0.0_f32; 4usize],
11635        index: 0_u8,
11636    };
11637    #[cfg(feature = "arbitrary")]
11638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11639        use arbitrary::{Arbitrary, Unstructured};
11640        let mut buf = [0u8; 1024];
11641        rng.fill_bytes(&mut buf);
11642        let mut unstructured = Unstructured::new(&buf);
11643        Self::arbitrary(&mut unstructured).unwrap_or_default()
11644    }
11645}
11646impl Default for ESC_STATUS_DATA {
11647    fn default() -> Self {
11648        Self::DEFAULT.clone()
11649    }
11650}
11651impl MessageData for ESC_STATUS_DATA {
11652    type Message = MavMessage;
11653    const ID: u32 = 291u32;
11654    const NAME: &'static str = "ESC_STATUS";
11655    const EXTRA_CRC: u8 = 10u8;
11656    const ENCODED_LEN: usize = 57usize;
11657    fn deser(
11658        _version: MavlinkVersion,
11659        __input: &[u8],
11660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11661        let avail_len = __input.len();
11662        let mut payload_buf = [0; Self::ENCODED_LEN];
11663        let mut buf = if avail_len < Self::ENCODED_LEN {
11664            payload_buf[0..avail_len].copy_from_slice(__input);
11665            Bytes::new(&payload_buf)
11666        } else {
11667            Bytes::new(__input)
11668        };
11669        let mut __struct = Self::default();
11670        __struct.time_usec = buf.get_u64_le();
11671        for v in &mut __struct.rpm {
11672            let val = buf.get_i32_le();
11673            *v = val;
11674        }
11675        for v in &mut __struct.voltage {
11676            let val = buf.get_f32_le();
11677            *v = val;
11678        }
11679        for v in &mut __struct.current {
11680            let val = buf.get_f32_le();
11681            *v = val;
11682        }
11683        __struct.index = buf.get_u8();
11684        Ok(__struct)
11685    }
11686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11687        let mut __tmp = BytesMut::new(bytes);
11688        #[allow(clippy::absurd_extreme_comparisons)]
11689        #[allow(unused_comparisons)]
11690        if __tmp.remaining() < Self::ENCODED_LEN {
11691            panic!(
11692                "buffer is too small (need {} bytes, but got {})",
11693                Self::ENCODED_LEN,
11694                __tmp.remaining(),
11695            )
11696        }
11697        __tmp.put_u64_le(self.time_usec);
11698        for val in &self.rpm {
11699            __tmp.put_i32_le(*val);
11700        }
11701        for val in &self.voltage {
11702            __tmp.put_f32_le(*val);
11703        }
11704        for val in &self.current {
11705            __tmp.put_f32_le(*val);
11706        }
11707        __tmp.put_u8(self.index);
11708        if matches!(version, MavlinkVersion::V2) {
11709            let len = __tmp.len();
11710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11711        } else {
11712            __tmp.len()
11713        }
11714    }
11715}
11716#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11717#[doc = ""]
11718#[doc = "ID: 230"]
11719#[derive(Debug, Clone, PartialEq)]
11720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11722#[cfg_attr(feature = "ts", derive(TS))]
11723#[cfg_attr(feature = "ts", ts(export))]
11724pub struct ESTIMATOR_STATUS_DATA {
11725    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11726    pub time_usec: u64,
11727    #[doc = "Velocity innovation test ratio"]
11728    pub vel_ratio: f32,
11729    #[doc = "Horizontal position innovation test ratio"]
11730    pub pos_horiz_ratio: f32,
11731    #[doc = "Vertical position innovation test ratio"]
11732    pub pos_vert_ratio: f32,
11733    #[doc = "Magnetometer innovation test ratio"]
11734    pub mag_ratio: f32,
11735    #[doc = "Height above terrain innovation test ratio"]
11736    pub hagl_ratio: f32,
11737    #[doc = "True airspeed innovation test ratio"]
11738    pub tas_ratio: f32,
11739    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11740    pub pos_horiz_accuracy: f32,
11741    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11742    pub pos_vert_accuracy: f32,
11743    #[doc = "Bitmap indicating which EKF outputs are valid."]
11744    pub flags: EstimatorStatusFlags,
11745}
11746impl ESTIMATOR_STATUS_DATA {
11747    pub const ENCODED_LEN: usize = 42usize;
11748    pub const DEFAULT: Self = Self {
11749        time_usec: 0_u64,
11750        vel_ratio: 0.0_f32,
11751        pos_horiz_ratio: 0.0_f32,
11752        pos_vert_ratio: 0.0_f32,
11753        mag_ratio: 0.0_f32,
11754        hagl_ratio: 0.0_f32,
11755        tas_ratio: 0.0_f32,
11756        pos_horiz_accuracy: 0.0_f32,
11757        pos_vert_accuracy: 0.0_f32,
11758        flags: EstimatorStatusFlags::DEFAULT,
11759    };
11760    #[cfg(feature = "arbitrary")]
11761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11762        use arbitrary::{Arbitrary, Unstructured};
11763        let mut buf = [0u8; 1024];
11764        rng.fill_bytes(&mut buf);
11765        let mut unstructured = Unstructured::new(&buf);
11766        Self::arbitrary(&mut unstructured).unwrap_or_default()
11767    }
11768}
11769impl Default for ESTIMATOR_STATUS_DATA {
11770    fn default() -> Self {
11771        Self::DEFAULT.clone()
11772    }
11773}
11774impl MessageData for ESTIMATOR_STATUS_DATA {
11775    type Message = MavMessage;
11776    const ID: u32 = 230u32;
11777    const NAME: &'static str = "ESTIMATOR_STATUS";
11778    const EXTRA_CRC: u8 = 163u8;
11779    const ENCODED_LEN: usize = 42usize;
11780    fn deser(
11781        _version: MavlinkVersion,
11782        __input: &[u8],
11783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11784        let avail_len = __input.len();
11785        let mut payload_buf = [0; Self::ENCODED_LEN];
11786        let mut buf = if avail_len < Self::ENCODED_LEN {
11787            payload_buf[0..avail_len].copy_from_slice(__input);
11788            Bytes::new(&payload_buf)
11789        } else {
11790            Bytes::new(__input)
11791        };
11792        let mut __struct = Self::default();
11793        __struct.time_usec = buf.get_u64_le();
11794        __struct.vel_ratio = buf.get_f32_le();
11795        __struct.pos_horiz_ratio = buf.get_f32_le();
11796        __struct.pos_vert_ratio = buf.get_f32_le();
11797        __struct.mag_ratio = buf.get_f32_le();
11798        __struct.hagl_ratio = buf.get_f32_le();
11799        __struct.tas_ratio = buf.get_f32_le();
11800        __struct.pos_horiz_accuracy = buf.get_f32_le();
11801        __struct.pos_vert_accuracy = buf.get_f32_le();
11802        let tmp = buf.get_u16_le();
11803        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11804            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11805                flag_type: "EstimatorStatusFlags",
11806                value: tmp as u32,
11807            })?;
11808        Ok(__struct)
11809    }
11810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11811        let mut __tmp = BytesMut::new(bytes);
11812        #[allow(clippy::absurd_extreme_comparisons)]
11813        #[allow(unused_comparisons)]
11814        if __tmp.remaining() < Self::ENCODED_LEN {
11815            panic!(
11816                "buffer is too small (need {} bytes, but got {})",
11817                Self::ENCODED_LEN,
11818                __tmp.remaining(),
11819            )
11820        }
11821        __tmp.put_u64_le(self.time_usec);
11822        __tmp.put_f32_le(self.vel_ratio);
11823        __tmp.put_f32_le(self.pos_horiz_ratio);
11824        __tmp.put_f32_le(self.pos_vert_ratio);
11825        __tmp.put_f32_le(self.mag_ratio);
11826        __tmp.put_f32_le(self.hagl_ratio);
11827        __tmp.put_f32_le(self.tas_ratio);
11828        __tmp.put_f32_le(self.pos_horiz_accuracy);
11829        __tmp.put_f32_le(self.pos_vert_accuracy);
11830        __tmp.put_u16_le(self.flags.bits());
11831        if matches!(version, MavlinkVersion::V2) {
11832            let len = __tmp.len();
11833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11834        } else {
11835            __tmp.len()
11836        }
11837    }
11838}
11839#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11840#[doc = ""]
11841#[doc = "ID: 410"]
11842#[derive(Debug, Clone, PartialEq)]
11843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11845#[cfg_attr(feature = "ts", derive(TS))]
11846#[cfg_attr(feature = "ts", ts(export))]
11847pub struct EVENT_DATA {
11848    #[doc = "Event ID (as defined in the component metadata)"]
11849    pub id: u32,
11850    #[doc = "Timestamp (time since system boot when the event happened)."]
11851    pub event_time_boot_ms: u32,
11852    #[doc = "Sequence number."]
11853    pub sequence: u16,
11854    #[doc = "Component ID"]
11855    pub destination_component: u8,
11856    #[doc = "System ID"]
11857    pub destination_system: u8,
11858    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11859    pub log_levels: u8,
11860    #[doc = "Arguments (depend on event ID)."]
11861    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11862    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11863    pub arguments: [u8; 40],
11864}
11865impl EVENT_DATA {
11866    pub const ENCODED_LEN: usize = 53usize;
11867    pub const DEFAULT: Self = Self {
11868        id: 0_u32,
11869        event_time_boot_ms: 0_u32,
11870        sequence: 0_u16,
11871        destination_component: 0_u8,
11872        destination_system: 0_u8,
11873        log_levels: 0_u8,
11874        arguments: [0_u8; 40usize],
11875    };
11876    #[cfg(feature = "arbitrary")]
11877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11878        use arbitrary::{Arbitrary, Unstructured};
11879        let mut buf = [0u8; 1024];
11880        rng.fill_bytes(&mut buf);
11881        let mut unstructured = Unstructured::new(&buf);
11882        Self::arbitrary(&mut unstructured).unwrap_or_default()
11883    }
11884}
11885impl Default for EVENT_DATA {
11886    fn default() -> Self {
11887        Self::DEFAULT.clone()
11888    }
11889}
11890impl MessageData for EVENT_DATA {
11891    type Message = MavMessage;
11892    const ID: u32 = 410u32;
11893    const NAME: &'static str = "EVENT";
11894    const EXTRA_CRC: u8 = 160u8;
11895    const ENCODED_LEN: usize = 53usize;
11896    fn deser(
11897        _version: MavlinkVersion,
11898        __input: &[u8],
11899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11900        let avail_len = __input.len();
11901        let mut payload_buf = [0; Self::ENCODED_LEN];
11902        let mut buf = if avail_len < Self::ENCODED_LEN {
11903            payload_buf[0..avail_len].copy_from_slice(__input);
11904            Bytes::new(&payload_buf)
11905        } else {
11906            Bytes::new(__input)
11907        };
11908        let mut __struct = Self::default();
11909        __struct.id = buf.get_u32_le();
11910        __struct.event_time_boot_ms = buf.get_u32_le();
11911        __struct.sequence = buf.get_u16_le();
11912        __struct.destination_component = buf.get_u8();
11913        __struct.destination_system = buf.get_u8();
11914        __struct.log_levels = buf.get_u8();
11915        for v in &mut __struct.arguments {
11916            let val = buf.get_u8();
11917            *v = val;
11918        }
11919        Ok(__struct)
11920    }
11921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11922        let mut __tmp = BytesMut::new(bytes);
11923        #[allow(clippy::absurd_extreme_comparisons)]
11924        #[allow(unused_comparisons)]
11925        if __tmp.remaining() < Self::ENCODED_LEN {
11926            panic!(
11927                "buffer is too small (need {} bytes, but got {})",
11928                Self::ENCODED_LEN,
11929                __tmp.remaining(),
11930            )
11931        }
11932        __tmp.put_u32_le(self.id);
11933        __tmp.put_u32_le(self.event_time_boot_ms);
11934        __tmp.put_u16_le(self.sequence);
11935        __tmp.put_u8(self.destination_component);
11936        __tmp.put_u8(self.destination_system);
11937        __tmp.put_u8(self.log_levels);
11938        for val in &self.arguments {
11939            __tmp.put_u8(*val);
11940        }
11941        if matches!(version, MavlinkVersion::V2) {
11942            let len = __tmp.len();
11943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11944        } else {
11945            __tmp.len()
11946        }
11947    }
11948}
11949#[doc = "Provides state for additional features."]
11950#[doc = ""]
11951#[doc = "ID: 245"]
11952#[derive(Debug, Clone, PartialEq)]
11953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11955#[cfg_attr(feature = "ts", derive(TS))]
11956#[cfg_attr(feature = "ts", ts(export))]
11957pub struct EXTENDED_SYS_STATE_DATA {
11958    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11959    pub vtol_state: MavVtolState,
11960    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11961    pub landed_state: MavLandedState,
11962}
11963impl EXTENDED_SYS_STATE_DATA {
11964    pub const ENCODED_LEN: usize = 2usize;
11965    pub const DEFAULT: Self = Self {
11966        vtol_state: MavVtolState::DEFAULT,
11967        landed_state: MavLandedState::DEFAULT,
11968    };
11969    #[cfg(feature = "arbitrary")]
11970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11971        use arbitrary::{Arbitrary, Unstructured};
11972        let mut buf = [0u8; 1024];
11973        rng.fill_bytes(&mut buf);
11974        let mut unstructured = Unstructured::new(&buf);
11975        Self::arbitrary(&mut unstructured).unwrap_or_default()
11976    }
11977}
11978impl Default for EXTENDED_SYS_STATE_DATA {
11979    fn default() -> Self {
11980        Self::DEFAULT.clone()
11981    }
11982}
11983impl MessageData for EXTENDED_SYS_STATE_DATA {
11984    type Message = MavMessage;
11985    const ID: u32 = 245u32;
11986    const NAME: &'static str = "EXTENDED_SYS_STATE";
11987    const EXTRA_CRC: u8 = 130u8;
11988    const ENCODED_LEN: usize = 2usize;
11989    fn deser(
11990        _version: MavlinkVersion,
11991        __input: &[u8],
11992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11993        let avail_len = __input.len();
11994        let mut payload_buf = [0; Self::ENCODED_LEN];
11995        let mut buf = if avail_len < Self::ENCODED_LEN {
11996            payload_buf[0..avail_len].copy_from_slice(__input);
11997            Bytes::new(&payload_buf)
11998        } else {
11999            Bytes::new(__input)
12000        };
12001        let mut __struct = Self::default();
12002        let tmp = buf.get_u8();
12003        __struct.vtol_state =
12004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12005                enum_type: "MavVtolState",
12006                value: tmp as u32,
12007            })?;
12008        let tmp = buf.get_u8();
12009        __struct.landed_state =
12010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12011                enum_type: "MavLandedState",
12012                value: tmp as u32,
12013            })?;
12014        Ok(__struct)
12015    }
12016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12017        let mut __tmp = BytesMut::new(bytes);
12018        #[allow(clippy::absurd_extreme_comparisons)]
12019        #[allow(unused_comparisons)]
12020        if __tmp.remaining() < Self::ENCODED_LEN {
12021            panic!(
12022                "buffer is too small (need {} bytes, but got {})",
12023                Self::ENCODED_LEN,
12024                __tmp.remaining(),
12025            )
12026        }
12027        __tmp.put_u8(self.vtol_state as u8);
12028        __tmp.put_u8(self.landed_state as u8);
12029        if matches!(version, MavlinkVersion::V2) {
12030            let len = __tmp.len();
12031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12032        } else {
12033            __tmp.len()
12034        }
12035    }
12036}
12037#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12038#[doc = ""]
12039#[doc = "ID: 162"]
12040#[derive(Debug, Clone, PartialEq)]
12041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12043#[cfg_attr(feature = "ts", derive(TS))]
12044#[cfg_attr(feature = "ts", ts(export))]
12045pub struct FENCE_STATUS_DATA {
12046    #[doc = "Time (since boot) of last breach."]
12047    pub breach_time: u32,
12048    #[doc = "Number of fence breaches."]
12049    pub breach_count: u16,
12050    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12051    pub breach_status: u8,
12052    #[doc = "Last breach type."]
12053    pub breach_type: FenceBreach,
12054    #[doc = "Active action to prevent fence breach"]
12055    #[cfg_attr(feature = "serde", serde(default))]
12056    pub breach_mitigation: FenceMitigate,
12057}
12058impl FENCE_STATUS_DATA {
12059    pub const ENCODED_LEN: usize = 9usize;
12060    pub const DEFAULT: Self = Self {
12061        breach_time: 0_u32,
12062        breach_count: 0_u16,
12063        breach_status: 0_u8,
12064        breach_type: FenceBreach::DEFAULT,
12065        breach_mitigation: FenceMitigate::DEFAULT,
12066    };
12067    #[cfg(feature = "arbitrary")]
12068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12069        use arbitrary::{Arbitrary, Unstructured};
12070        let mut buf = [0u8; 1024];
12071        rng.fill_bytes(&mut buf);
12072        let mut unstructured = Unstructured::new(&buf);
12073        Self::arbitrary(&mut unstructured).unwrap_or_default()
12074    }
12075}
12076impl Default for FENCE_STATUS_DATA {
12077    fn default() -> Self {
12078        Self::DEFAULT.clone()
12079    }
12080}
12081impl MessageData for FENCE_STATUS_DATA {
12082    type Message = MavMessage;
12083    const ID: u32 = 162u32;
12084    const NAME: &'static str = "FENCE_STATUS";
12085    const EXTRA_CRC: u8 = 189u8;
12086    const ENCODED_LEN: usize = 9usize;
12087    fn deser(
12088        _version: MavlinkVersion,
12089        __input: &[u8],
12090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12091        let avail_len = __input.len();
12092        let mut payload_buf = [0; Self::ENCODED_LEN];
12093        let mut buf = if avail_len < Self::ENCODED_LEN {
12094            payload_buf[0..avail_len].copy_from_slice(__input);
12095            Bytes::new(&payload_buf)
12096        } else {
12097            Bytes::new(__input)
12098        };
12099        let mut __struct = Self::default();
12100        __struct.breach_time = buf.get_u32_le();
12101        __struct.breach_count = buf.get_u16_le();
12102        __struct.breach_status = buf.get_u8();
12103        let tmp = buf.get_u8();
12104        __struct.breach_type =
12105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12106                enum_type: "FenceBreach",
12107                value: tmp as u32,
12108            })?;
12109        let tmp = buf.get_u8();
12110        __struct.breach_mitigation =
12111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12112                enum_type: "FenceMitigate",
12113                value: tmp as u32,
12114            })?;
12115        Ok(__struct)
12116    }
12117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12118        let mut __tmp = BytesMut::new(bytes);
12119        #[allow(clippy::absurd_extreme_comparisons)]
12120        #[allow(unused_comparisons)]
12121        if __tmp.remaining() < Self::ENCODED_LEN {
12122            panic!(
12123                "buffer is too small (need {} bytes, but got {})",
12124                Self::ENCODED_LEN,
12125                __tmp.remaining(),
12126            )
12127        }
12128        __tmp.put_u32_le(self.breach_time);
12129        __tmp.put_u16_le(self.breach_count);
12130        __tmp.put_u8(self.breach_status);
12131        __tmp.put_u8(self.breach_type as u8);
12132        if matches!(version, MavlinkVersion::V2) {
12133            __tmp.put_u8(self.breach_mitigation as u8);
12134            let len = __tmp.len();
12135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12136        } else {
12137            __tmp.len()
12138        }
12139    }
12140}
12141#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12142#[doc = ""]
12143#[doc = "ID: 110"]
12144#[derive(Debug, Clone, PartialEq)]
12145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12147#[cfg_attr(feature = "ts", derive(TS))]
12148#[cfg_attr(feature = "ts", ts(export))]
12149pub struct FILE_TRANSFER_PROTOCOL_DATA {
12150    #[doc = "Network ID (0 for broadcast)"]
12151    pub target_network: u8,
12152    #[doc = "System ID (0 for broadcast)"]
12153    pub target_system: u8,
12154    #[doc = "Component ID (0 for broadcast)"]
12155    pub target_component: u8,
12156    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12159    pub payload: [u8; 251],
12160}
12161impl FILE_TRANSFER_PROTOCOL_DATA {
12162    pub const ENCODED_LEN: usize = 254usize;
12163    pub const DEFAULT: Self = Self {
12164        target_network: 0_u8,
12165        target_system: 0_u8,
12166        target_component: 0_u8,
12167        payload: [0_u8; 251usize],
12168    };
12169    #[cfg(feature = "arbitrary")]
12170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12171        use arbitrary::{Arbitrary, Unstructured};
12172        let mut buf = [0u8; 1024];
12173        rng.fill_bytes(&mut buf);
12174        let mut unstructured = Unstructured::new(&buf);
12175        Self::arbitrary(&mut unstructured).unwrap_or_default()
12176    }
12177}
12178impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12179    fn default() -> Self {
12180        Self::DEFAULT.clone()
12181    }
12182}
12183impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12184    type Message = MavMessage;
12185    const ID: u32 = 110u32;
12186    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12187    const EXTRA_CRC: u8 = 84u8;
12188    const ENCODED_LEN: usize = 254usize;
12189    fn deser(
12190        _version: MavlinkVersion,
12191        __input: &[u8],
12192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12193        let avail_len = __input.len();
12194        let mut payload_buf = [0; Self::ENCODED_LEN];
12195        let mut buf = if avail_len < Self::ENCODED_LEN {
12196            payload_buf[0..avail_len].copy_from_slice(__input);
12197            Bytes::new(&payload_buf)
12198        } else {
12199            Bytes::new(__input)
12200        };
12201        let mut __struct = Self::default();
12202        __struct.target_network = buf.get_u8();
12203        __struct.target_system = buf.get_u8();
12204        __struct.target_component = buf.get_u8();
12205        for v in &mut __struct.payload {
12206            let val = buf.get_u8();
12207            *v = val;
12208        }
12209        Ok(__struct)
12210    }
12211    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12212        let mut __tmp = BytesMut::new(bytes);
12213        #[allow(clippy::absurd_extreme_comparisons)]
12214        #[allow(unused_comparisons)]
12215        if __tmp.remaining() < Self::ENCODED_LEN {
12216            panic!(
12217                "buffer is too small (need {} bytes, but got {})",
12218                Self::ENCODED_LEN,
12219                __tmp.remaining(),
12220            )
12221        }
12222        __tmp.put_u8(self.target_network);
12223        __tmp.put_u8(self.target_system);
12224        __tmp.put_u8(self.target_component);
12225        for val in &self.payload {
12226            __tmp.put_u8(*val);
12227        }
12228        if matches!(version, MavlinkVersion::V2) {
12229            let len = __tmp.len();
12230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12231        } else {
12232            __tmp.len()
12233        }
12234    }
12235}
12236#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12237#[doc = ""]
12238#[doc = "ID: 264"]
12239#[derive(Debug, Clone, PartialEq)]
12240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12242#[cfg_attr(feature = "ts", derive(TS))]
12243#[cfg_attr(feature = "ts", ts(export))]
12244pub struct FLIGHT_INFORMATION_DATA {
12245    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12246    pub arming_time_utc: u64,
12247    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12248    pub takeoff_time_utc: u64,
12249    #[doc = "Flight number. Note, field is misnamed UUID."]
12250    pub flight_uuid: u64,
12251    #[doc = "Timestamp (time since system boot)."]
12252    pub time_boot_ms: u32,
12253    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12254    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12255    pub landing_time: u32,
12256}
12257impl FLIGHT_INFORMATION_DATA {
12258    pub const ENCODED_LEN: usize = 32usize;
12259    pub const DEFAULT: Self = Self {
12260        arming_time_utc: 0_u64,
12261        takeoff_time_utc: 0_u64,
12262        flight_uuid: 0_u64,
12263        time_boot_ms: 0_u32,
12264        landing_time: 0_u32,
12265    };
12266    #[cfg(feature = "arbitrary")]
12267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12268        use arbitrary::{Arbitrary, Unstructured};
12269        let mut buf = [0u8; 1024];
12270        rng.fill_bytes(&mut buf);
12271        let mut unstructured = Unstructured::new(&buf);
12272        Self::arbitrary(&mut unstructured).unwrap_or_default()
12273    }
12274}
12275impl Default for FLIGHT_INFORMATION_DATA {
12276    fn default() -> Self {
12277        Self::DEFAULT.clone()
12278    }
12279}
12280impl MessageData for FLIGHT_INFORMATION_DATA {
12281    type Message = MavMessage;
12282    const ID: u32 = 264u32;
12283    const NAME: &'static str = "FLIGHT_INFORMATION";
12284    const EXTRA_CRC: u8 = 49u8;
12285    const ENCODED_LEN: usize = 32usize;
12286    fn deser(
12287        _version: MavlinkVersion,
12288        __input: &[u8],
12289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12290        let avail_len = __input.len();
12291        let mut payload_buf = [0; Self::ENCODED_LEN];
12292        let mut buf = if avail_len < Self::ENCODED_LEN {
12293            payload_buf[0..avail_len].copy_from_slice(__input);
12294            Bytes::new(&payload_buf)
12295        } else {
12296            Bytes::new(__input)
12297        };
12298        let mut __struct = Self::default();
12299        __struct.arming_time_utc = buf.get_u64_le();
12300        __struct.takeoff_time_utc = buf.get_u64_le();
12301        __struct.flight_uuid = buf.get_u64_le();
12302        __struct.time_boot_ms = buf.get_u32_le();
12303        __struct.landing_time = buf.get_u32_le();
12304        Ok(__struct)
12305    }
12306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12307        let mut __tmp = BytesMut::new(bytes);
12308        #[allow(clippy::absurd_extreme_comparisons)]
12309        #[allow(unused_comparisons)]
12310        if __tmp.remaining() < Self::ENCODED_LEN {
12311            panic!(
12312                "buffer is too small (need {} bytes, but got {})",
12313                Self::ENCODED_LEN,
12314                __tmp.remaining(),
12315            )
12316        }
12317        __tmp.put_u64_le(self.arming_time_utc);
12318        __tmp.put_u64_le(self.takeoff_time_utc);
12319        __tmp.put_u64_le(self.flight_uuid);
12320        __tmp.put_u32_le(self.time_boot_ms);
12321        if matches!(version, MavlinkVersion::V2) {
12322            __tmp.put_u32_le(self.landing_time);
12323            let len = __tmp.len();
12324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12325        } else {
12326            __tmp.len()
12327        }
12328    }
12329}
12330#[doc = "Current motion information from a designated system."]
12331#[doc = ""]
12332#[doc = "ID: 144"]
12333#[derive(Debug, Clone, PartialEq)]
12334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12336#[cfg_attr(feature = "ts", derive(TS))]
12337#[cfg_attr(feature = "ts", ts(export))]
12338pub struct FOLLOW_TARGET_DATA {
12339    #[doc = "Timestamp (time since system boot)."]
12340    pub timestamp: u64,
12341    #[doc = "button states or switches of a tracker device"]
12342    pub custom_state: u64,
12343    #[doc = "Latitude (WGS84)"]
12344    pub lat: i32,
12345    #[doc = "Longitude (WGS84)"]
12346    pub lon: i32,
12347    #[doc = "Altitude (MSL)"]
12348    pub alt: f32,
12349    #[doc = "target velocity (0,0,0) for unknown"]
12350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12351    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12352    pub vel: [f32; 3],
12353    #[doc = "linear target acceleration (0,0,0) for unknown"]
12354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12356    pub acc: [f32; 3],
12357    #[doc = "(0 0 0 0 for unknown)"]
12358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12359    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12360    pub attitude_q: [f32; 4],
12361    #[doc = "(0 0 0 for unknown)"]
12362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12363    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12364    pub rates: [f32; 3],
12365    #[doc = "eph epv"]
12366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12368    pub position_cov: [f32; 3],
12369    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12370    pub est_capabilities: u8,
12371}
12372impl FOLLOW_TARGET_DATA {
12373    pub const ENCODED_LEN: usize = 93usize;
12374    pub const DEFAULT: Self = Self {
12375        timestamp: 0_u64,
12376        custom_state: 0_u64,
12377        lat: 0_i32,
12378        lon: 0_i32,
12379        alt: 0.0_f32,
12380        vel: [0.0_f32; 3usize],
12381        acc: [0.0_f32; 3usize],
12382        attitude_q: [0.0_f32; 4usize],
12383        rates: [0.0_f32; 3usize],
12384        position_cov: [0.0_f32; 3usize],
12385        est_capabilities: 0_u8,
12386    };
12387    #[cfg(feature = "arbitrary")]
12388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12389        use arbitrary::{Arbitrary, Unstructured};
12390        let mut buf = [0u8; 1024];
12391        rng.fill_bytes(&mut buf);
12392        let mut unstructured = Unstructured::new(&buf);
12393        Self::arbitrary(&mut unstructured).unwrap_or_default()
12394    }
12395}
12396impl Default for FOLLOW_TARGET_DATA {
12397    fn default() -> Self {
12398        Self::DEFAULT.clone()
12399    }
12400}
12401impl MessageData for FOLLOW_TARGET_DATA {
12402    type Message = MavMessage;
12403    const ID: u32 = 144u32;
12404    const NAME: &'static str = "FOLLOW_TARGET";
12405    const EXTRA_CRC: u8 = 127u8;
12406    const ENCODED_LEN: usize = 93usize;
12407    fn deser(
12408        _version: MavlinkVersion,
12409        __input: &[u8],
12410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12411        let avail_len = __input.len();
12412        let mut payload_buf = [0; Self::ENCODED_LEN];
12413        let mut buf = if avail_len < Self::ENCODED_LEN {
12414            payload_buf[0..avail_len].copy_from_slice(__input);
12415            Bytes::new(&payload_buf)
12416        } else {
12417            Bytes::new(__input)
12418        };
12419        let mut __struct = Self::default();
12420        __struct.timestamp = buf.get_u64_le();
12421        __struct.custom_state = buf.get_u64_le();
12422        __struct.lat = buf.get_i32_le();
12423        __struct.lon = buf.get_i32_le();
12424        __struct.alt = buf.get_f32_le();
12425        for v in &mut __struct.vel {
12426            let val = buf.get_f32_le();
12427            *v = val;
12428        }
12429        for v in &mut __struct.acc {
12430            let val = buf.get_f32_le();
12431            *v = val;
12432        }
12433        for v in &mut __struct.attitude_q {
12434            let val = buf.get_f32_le();
12435            *v = val;
12436        }
12437        for v in &mut __struct.rates {
12438            let val = buf.get_f32_le();
12439            *v = val;
12440        }
12441        for v in &mut __struct.position_cov {
12442            let val = buf.get_f32_le();
12443            *v = val;
12444        }
12445        __struct.est_capabilities = buf.get_u8();
12446        Ok(__struct)
12447    }
12448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12449        let mut __tmp = BytesMut::new(bytes);
12450        #[allow(clippy::absurd_extreme_comparisons)]
12451        #[allow(unused_comparisons)]
12452        if __tmp.remaining() < Self::ENCODED_LEN {
12453            panic!(
12454                "buffer is too small (need {} bytes, but got {})",
12455                Self::ENCODED_LEN,
12456                __tmp.remaining(),
12457            )
12458        }
12459        __tmp.put_u64_le(self.timestamp);
12460        __tmp.put_u64_le(self.custom_state);
12461        __tmp.put_i32_le(self.lat);
12462        __tmp.put_i32_le(self.lon);
12463        __tmp.put_f32_le(self.alt);
12464        for val in &self.vel {
12465            __tmp.put_f32_le(*val);
12466        }
12467        for val in &self.acc {
12468            __tmp.put_f32_le(*val);
12469        }
12470        for val in &self.attitude_q {
12471            __tmp.put_f32_le(*val);
12472        }
12473        for val in &self.rates {
12474            __tmp.put_f32_le(*val);
12475        }
12476        for val in &self.position_cov {
12477            __tmp.put_f32_le(*val);
12478        }
12479        __tmp.put_u8(self.est_capabilities);
12480        if matches!(version, MavlinkVersion::V2) {
12481            let len = __tmp.len();
12482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12483        } else {
12484            __tmp.len()
12485        }
12486    }
12487}
12488#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12489#[doc = ""]
12490#[doc = "ID: 371"]
12491#[derive(Debug, Clone, PartialEq)]
12492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12494#[cfg_attr(feature = "ts", derive(TS))]
12495#[cfg_attr(feature = "ts", ts(export))]
12496pub struct FUEL_STATUS_DATA {
12497    #[doc = "Capacity when full. Must be provided."]
12498    pub maximum_fuel: f32,
12499    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12500    pub consumed_fuel: f32,
12501    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12502    pub remaining_fuel: f32,
12503    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12504    pub flow_rate: f32,
12505    #[doc = "Fuel temperature. NaN: field not provided."]
12506    pub temperature: f32,
12507    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12508    pub fuel_type: MavFuelType,
12509    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12510    pub id: u8,
12511    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12512    pub percent_remaining: u8,
12513}
12514impl FUEL_STATUS_DATA {
12515    pub const ENCODED_LEN: usize = 26usize;
12516    pub const DEFAULT: Self = Self {
12517        maximum_fuel: 0.0_f32,
12518        consumed_fuel: 0.0_f32,
12519        remaining_fuel: 0.0_f32,
12520        flow_rate: 0.0_f32,
12521        temperature: 0.0_f32,
12522        fuel_type: MavFuelType::DEFAULT,
12523        id: 0_u8,
12524        percent_remaining: 0_u8,
12525    };
12526    #[cfg(feature = "arbitrary")]
12527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12528        use arbitrary::{Arbitrary, Unstructured};
12529        let mut buf = [0u8; 1024];
12530        rng.fill_bytes(&mut buf);
12531        let mut unstructured = Unstructured::new(&buf);
12532        Self::arbitrary(&mut unstructured).unwrap_or_default()
12533    }
12534}
12535impl Default for FUEL_STATUS_DATA {
12536    fn default() -> Self {
12537        Self::DEFAULT.clone()
12538    }
12539}
12540impl MessageData for FUEL_STATUS_DATA {
12541    type Message = MavMessage;
12542    const ID: u32 = 371u32;
12543    const NAME: &'static str = "FUEL_STATUS";
12544    const EXTRA_CRC: u8 = 10u8;
12545    const ENCODED_LEN: usize = 26usize;
12546    fn deser(
12547        _version: MavlinkVersion,
12548        __input: &[u8],
12549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12550        let avail_len = __input.len();
12551        let mut payload_buf = [0; Self::ENCODED_LEN];
12552        let mut buf = if avail_len < Self::ENCODED_LEN {
12553            payload_buf[0..avail_len].copy_from_slice(__input);
12554            Bytes::new(&payload_buf)
12555        } else {
12556            Bytes::new(__input)
12557        };
12558        let mut __struct = Self::default();
12559        __struct.maximum_fuel = buf.get_f32_le();
12560        __struct.consumed_fuel = buf.get_f32_le();
12561        __struct.remaining_fuel = buf.get_f32_le();
12562        __struct.flow_rate = buf.get_f32_le();
12563        __struct.temperature = buf.get_f32_le();
12564        let tmp = buf.get_u32_le();
12565        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12566            ::mavlink_core::error::ParserError::InvalidEnum {
12567                enum_type: "MavFuelType",
12568                value: tmp as u32,
12569            },
12570        )?;
12571        __struct.id = buf.get_u8();
12572        __struct.percent_remaining = buf.get_u8();
12573        Ok(__struct)
12574    }
12575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12576        let mut __tmp = BytesMut::new(bytes);
12577        #[allow(clippy::absurd_extreme_comparisons)]
12578        #[allow(unused_comparisons)]
12579        if __tmp.remaining() < Self::ENCODED_LEN {
12580            panic!(
12581                "buffer is too small (need {} bytes, but got {})",
12582                Self::ENCODED_LEN,
12583                __tmp.remaining(),
12584            )
12585        }
12586        __tmp.put_f32_le(self.maximum_fuel);
12587        __tmp.put_f32_le(self.consumed_fuel);
12588        __tmp.put_f32_le(self.remaining_fuel);
12589        __tmp.put_f32_le(self.flow_rate);
12590        __tmp.put_f32_le(self.temperature);
12591        __tmp.put_u32_le(self.fuel_type as u32);
12592        __tmp.put_u8(self.id);
12593        __tmp.put_u8(self.percent_remaining);
12594        if matches!(version, MavlinkVersion::V2) {
12595            let len = __tmp.len();
12596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12597        } else {
12598            __tmp.len()
12599        }
12600    }
12601}
12602#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12603#[doc = ""]
12604#[doc = "ID: 373"]
12605#[derive(Debug, Clone, PartialEq)]
12606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12608#[cfg_attr(feature = "ts", derive(TS))]
12609#[cfg_attr(feature = "ts", ts(export))]
12610pub struct GENERATOR_STATUS_DATA {
12611    #[doc = "Status flags."]
12612    pub status: MavGeneratorStatusFlag,
12613    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12614    pub battery_current: f32,
12615    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12616    pub load_current: f32,
12617    #[doc = "The power being generated. NaN: field not provided"]
12618    pub power_generated: f32,
12619    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12620    pub bus_voltage: f32,
12621    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12622    pub bat_current_setpoint: f32,
12623    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12624    pub runtime: u32,
12625    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12626    pub time_until_maintenance: i32,
12627    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12628    pub generator_speed: u16,
12629    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12630    pub rectifier_temperature: i16,
12631    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12632    pub generator_temperature: i16,
12633}
12634impl GENERATOR_STATUS_DATA {
12635    pub const ENCODED_LEN: usize = 42usize;
12636    pub const DEFAULT: Self = Self {
12637        status: MavGeneratorStatusFlag::DEFAULT,
12638        battery_current: 0.0_f32,
12639        load_current: 0.0_f32,
12640        power_generated: 0.0_f32,
12641        bus_voltage: 0.0_f32,
12642        bat_current_setpoint: 0.0_f32,
12643        runtime: 0_u32,
12644        time_until_maintenance: 0_i32,
12645        generator_speed: 0_u16,
12646        rectifier_temperature: 0_i16,
12647        generator_temperature: 0_i16,
12648    };
12649    #[cfg(feature = "arbitrary")]
12650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12651        use arbitrary::{Arbitrary, Unstructured};
12652        let mut buf = [0u8; 1024];
12653        rng.fill_bytes(&mut buf);
12654        let mut unstructured = Unstructured::new(&buf);
12655        Self::arbitrary(&mut unstructured).unwrap_or_default()
12656    }
12657}
12658impl Default for GENERATOR_STATUS_DATA {
12659    fn default() -> Self {
12660        Self::DEFAULT.clone()
12661    }
12662}
12663impl MessageData for GENERATOR_STATUS_DATA {
12664    type Message = MavMessage;
12665    const ID: u32 = 373u32;
12666    const NAME: &'static str = "GENERATOR_STATUS";
12667    const EXTRA_CRC: u8 = 117u8;
12668    const ENCODED_LEN: usize = 42usize;
12669    fn deser(
12670        _version: MavlinkVersion,
12671        __input: &[u8],
12672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12673        let avail_len = __input.len();
12674        let mut payload_buf = [0; Self::ENCODED_LEN];
12675        let mut buf = if avail_len < Self::ENCODED_LEN {
12676            payload_buf[0..avail_len].copy_from_slice(__input);
12677            Bytes::new(&payload_buf)
12678        } else {
12679            Bytes::new(__input)
12680        };
12681        let mut __struct = Self::default();
12682        let tmp = buf.get_u64_le();
12683        __struct.status = MavGeneratorStatusFlag::from_bits(
12684            tmp & MavGeneratorStatusFlag::all().bits(),
12685        )
12686        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12687            flag_type: "MavGeneratorStatusFlag",
12688            value: tmp as u32,
12689        })?;
12690        __struct.battery_current = buf.get_f32_le();
12691        __struct.load_current = buf.get_f32_le();
12692        __struct.power_generated = buf.get_f32_le();
12693        __struct.bus_voltage = buf.get_f32_le();
12694        __struct.bat_current_setpoint = buf.get_f32_le();
12695        __struct.runtime = buf.get_u32_le();
12696        __struct.time_until_maintenance = buf.get_i32_le();
12697        __struct.generator_speed = buf.get_u16_le();
12698        __struct.rectifier_temperature = buf.get_i16_le();
12699        __struct.generator_temperature = buf.get_i16_le();
12700        Ok(__struct)
12701    }
12702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12703        let mut __tmp = BytesMut::new(bytes);
12704        #[allow(clippy::absurd_extreme_comparisons)]
12705        #[allow(unused_comparisons)]
12706        if __tmp.remaining() < Self::ENCODED_LEN {
12707            panic!(
12708                "buffer is too small (need {} bytes, but got {})",
12709                Self::ENCODED_LEN,
12710                __tmp.remaining(),
12711            )
12712        }
12713        __tmp.put_u64_le(self.status.bits());
12714        __tmp.put_f32_le(self.battery_current);
12715        __tmp.put_f32_le(self.load_current);
12716        __tmp.put_f32_le(self.power_generated);
12717        __tmp.put_f32_le(self.bus_voltage);
12718        __tmp.put_f32_le(self.bat_current_setpoint);
12719        __tmp.put_u32_le(self.runtime);
12720        __tmp.put_i32_le(self.time_until_maintenance);
12721        __tmp.put_u16_le(self.generator_speed);
12722        __tmp.put_i16_le(self.rectifier_temperature);
12723        __tmp.put_i16_le(self.generator_temperature);
12724        if matches!(version, MavlinkVersion::V2) {
12725            let len = __tmp.len();
12726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12727        } else {
12728            __tmp.len()
12729        }
12730    }
12731}
12732#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12733#[doc = ""]
12734#[doc = "ID: 285"]
12735#[derive(Debug, Clone, PartialEq)]
12736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12738#[cfg_attr(feature = "ts", derive(TS))]
12739#[cfg_attr(feature = "ts", ts(export))]
12740pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12741    #[doc = "Timestamp (time since system boot)."]
12742    pub time_boot_ms: u32,
12743    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12746    pub q: [f32; 4],
12747    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12748    pub angular_velocity_x: f32,
12749    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12750    pub angular_velocity_y: f32,
12751    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12752    pub angular_velocity_z: f32,
12753    #[doc = "Failure flags (0 for no failure)"]
12754    pub failure_flags: GimbalDeviceErrorFlags,
12755    #[doc = "Current gimbal flags set."]
12756    pub flags: GimbalDeviceFlags,
12757    #[doc = "System ID"]
12758    pub target_system: u8,
12759    #[doc = "Component ID"]
12760    pub target_component: u8,
12761    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12763    pub delta_yaw: f32,
12764    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12766    pub delta_yaw_velocity: f32,
12767    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12768    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12769    pub gimbal_device_id: u8,
12770}
12771impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12772    pub const ENCODED_LEN: usize = 49usize;
12773    pub const DEFAULT: Self = Self {
12774        time_boot_ms: 0_u32,
12775        q: [0.0_f32; 4usize],
12776        angular_velocity_x: 0.0_f32,
12777        angular_velocity_y: 0.0_f32,
12778        angular_velocity_z: 0.0_f32,
12779        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12780        flags: GimbalDeviceFlags::DEFAULT,
12781        target_system: 0_u8,
12782        target_component: 0_u8,
12783        delta_yaw: 0.0_f32,
12784        delta_yaw_velocity: 0.0_f32,
12785        gimbal_device_id: 0_u8,
12786    };
12787    #[cfg(feature = "arbitrary")]
12788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12789        use arbitrary::{Arbitrary, Unstructured};
12790        let mut buf = [0u8; 1024];
12791        rng.fill_bytes(&mut buf);
12792        let mut unstructured = Unstructured::new(&buf);
12793        Self::arbitrary(&mut unstructured).unwrap_or_default()
12794    }
12795}
12796impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12797    fn default() -> Self {
12798        Self::DEFAULT.clone()
12799    }
12800}
12801impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12802    type Message = MavMessage;
12803    const ID: u32 = 285u32;
12804    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12805    const EXTRA_CRC: u8 = 137u8;
12806    const ENCODED_LEN: usize = 49usize;
12807    fn deser(
12808        _version: MavlinkVersion,
12809        __input: &[u8],
12810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12811        let avail_len = __input.len();
12812        let mut payload_buf = [0; Self::ENCODED_LEN];
12813        let mut buf = if avail_len < Self::ENCODED_LEN {
12814            payload_buf[0..avail_len].copy_from_slice(__input);
12815            Bytes::new(&payload_buf)
12816        } else {
12817            Bytes::new(__input)
12818        };
12819        let mut __struct = Self::default();
12820        __struct.time_boot_ms = buf.get_u32_le();
12821        for v in &mut __struct.q {
12822            let val = buf.get_f32_le();
12823            *v = val;
12824        }
12825        __struct.angular_velocity_x = buf.get_f32_le();
12826        __struct.angular_velocity_y = buf.get_f32_le();
12827        __struct.angular_velocity_z = buf.get_f32_le();
12828        let tmp = buf.get_u32_le();
12829        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12830            tmp & GimbalDeviceErrorFlags::all().bits(),
12831        )
12832        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12833            flag_type: "GimbalDeviceErrorFlags",
12834            value: tmp as u32,
12835        })?;
12836        let tmp = buf.get_u16_le();
12837        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12838            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12839                flag_type: "GimbalDeviceFlags",
12840                value: tmp as u32,
12841            })?;
12842        __struct.target_system = buf.get_u8();
12843        __struct.target_component = buf.get_u8();
12844        __struct.delta_yaw = buf.get_f32_le();
12845        __struct.delta_yaw_velocity = buf.get_f32_le();
12846        __struct.gimbal_device_id = buf.get_u8();
12847        Ok(__struct)
12848    }
12849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12850        let mut __tmp = BytesMut::new(bytes);
12851        #[allow(clippy::absurd_extreme_comparisons)]
12852        #[allow(unused_comparisons)]
12853        if __tmp.remaining() < Self::ENCODED_LEN {
12854            panic!(
12855                "buffer is too small (need {} bytes, but got {})",
12856                Self::ENCODED_LEN,
12857                __tmp.remaining(),
12858            )
12859        }
12860        __tmp.put_u32_le(self.time_boot_ms);
12861        for val in &self.q {
12862            __tmp.put_f32_le(*val);
12863        }
12864        __tmp.put_f32_le(self.angular_velocity_x);
12865        __tmp.put_f32_le(self.angular_velocity_y);
12866        __tmp.put_f32_le(self.angular_velocity_z);
12867        __tmp.put_u32_le(self.failure_flags.bits());
12868        __tmp.put_u16_le(self.flags.bits());
12869        __tmp.put_u8(self.target_system);
12870        __tmp.put_u8(self.target_component);
12871        if matches!(version, MavlinkVersion::V2) {
12872            __tmp.put_f32_le(self.delta_yaw);
12873            __tmp.put_f32_le(self.delta_yaw_velocity);
12874            __tmp.put_u8(self.gimbal_device_id);
12875            let len = __tmp.len();
12876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12877        } else {
12878            __tmp.len()
12879        }
12880    }
12881}
12882#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12883#[doc = ""]
12884#[doc = "ID: 283"]
12885#[derive(Debug, Clone, PartialEq)]
12886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12888#[cfg_attr(feature = "ts", derive(TS))]
12889#[cfg_attr(feature = "ts", ts(export))]
12890pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12891    #[doc = "UID of gimbal hardware (0 if unknown)."]
12892    pub uid: u64,
12893    #[doc = "Timestamp (time since system boot)."]
12894    pub time_boot_ms: u32,
12895    #[doc = "0xff)."]
12896    pub firmware_version: u32,
12897    #[doc = "0xff)."]
12898    pub hardware_version: u32,
12899    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12900    pub roll_min: f32,
12901    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12902    pub roll_max: f32,
12903    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12904    pub pitch_min: f32,
12905    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12906    pub pitch_max: f32,
12907    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12908    pub yaw_min: f32,
12909    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12910    pub yaw_max: f32,
12911    #[doc = "Bitmap of gimbal capability flags."]
12912    pub cap_flags: GimbalDeviceCapFlags,
12913    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12914    pub custom_cap_flags: u16,
12915    #[doc = "Name of the gimbal vendor."]
12916    #[cfg_attr(feature = "ts", ts(type = "string"))]
12917    pub vendor_name: CharArray<32>,
12918    #[doc = "Name of the gimbal model."]
12919    #[cfg_attr(feature = "ts", ts(type = "string"))]
12920    pub model_name: CharArray<32>,
12921    #[doc = "Custom name of the gimbal given to it by the user."]
12922    #[cfg_attr(feature = "ts", ts(type = "string"))]
12923    pub custom_name: CharArray<32>,
12924    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12926    pub gimbal_device_id: u8,
12927}
12928impl GIMBAL_DEVICE_INFORMATION_DATA {
12929    pub const ENCODED_LEN: usize = 145usize;
12930    pub const DEFAULT: Self = Self {
12931        uid: 0_u64,
12932        time_boot_ms: 0_u32,
12933        firmware_version: 0_u32,
12934        hardware_version: 0_u32,
12935        roll_min: 0.0_f32,
12936        roll_max: 0.0_f32,
12937        pitch_min: 0.0_f32,
12938        pitch_max: 0.0_f32,
12939        yaw_min: 0.0_f32,
12940        yaw_max: 0.0_f32,
12941        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12942        custom_cap_flags: 0_u16,
12943        vendor_name: CharArray::new([0_u8; 32usize]),
12944        model_name: CharArray::new([0_u8; 32usize]),
12945        custom_name: CharArray::new([0_u8; 32usize]),
12946        gimbal_device_id: 0_u8,
12947    };
12948    #[cfg(feature = "arbitrary")]
12949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12950        use arbitrary::{Arbitrary, Unstructured};
12951        let mut buf = [0u8; 1024];
12952        rng.fill_bytes(&mut buf);
12953        let mut unstructured = Unstructured::new(&buf);
12954        Self::arbitrary(&mut unstructured).unwrap_or_default()
12955    }
12956}
12957impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12958    fn default() -> Self {
12959        Self::DEFAULT.clone()
12960    }
12961}
12962impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12963    type Message = MavMessage;
12964    const ID: u32 = 283u32;
12965    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12966    const EXTRA_CRC: u8 = 74u8;
12967    const ENCODED_LEN: usize = 145usize;
12968    fn deser(
12969        _version: MavlinkVersion,
12970        __input: &[u8],
12971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12972        let avail_len = __input.len();
12973        let mut payload_buf = [0; Self::ENCODED_LEN];
12974        let mut buf = if avail_len < Self::ENCODED_LEN {
12975            payload_buf[0..avail_len].copy_from_slice(__input);
12976            Bytes::new(&payload_buf)
12977        } else {
12978            Bytes::new(__input)
12979        };
12980        let mut __struct = Self::default();
12981        __struct.uid = buf.get_u64_le();
12982        __struct.time_boot_ms = buf.get_u32_le();
12983        __struct.firmware_version = buf.get_u32_le();
12984        __struct.hardware_version = buf.get_u32_le();
12985        __struct.roll_min = buf.get_f32_le();
12986        __struct.roll_max = buf.get_f32_le();
12987        __struct.pitch_min = buf.get_f32_le();
12988        __struct.pitch_max = buf.get_f32_le();
12989        __struct.yaw_min = buf.get_f32_le();
12990        __struct.yaw_max = buf.get_f32_le();
12991        let tmp = buf.get_u16_le();
12992        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12993            tmp & GimbalDeviceCapFlags::all().bits(),
12994        )
12995        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12996            flag_type: "GimbalDeviceCapFlags",
12997            value: tmp as u32,
12998        })?;
12999        __struct.custom_cap_flags = buf.get_u16_le();
13000        let mut tmp = [0_u8; 32usize];
13001        for v in &mut tmp {
13002            *v = buf.get_u8();
13003        }
13004        __struct.vendor_name = CharArray::new(tmp);
13005        let mut tmp = [0_u8; 32usize];
13006        for v in &mut tmp {
13007            *v = buf.get_u8();
13008        }
13009        __struct.model_name = CharArray::new(tmp);
13010        let mut tmp = [0_u8; 32usize];
13011        for v in &mut tmp {
13012            *v = buf.get_u8();
13013        }
13014        __struct.custom_name = CharArray::new(tmp);
13015        __struct.gimbal_device_id = buf.get_u8();
13016        Ok(__struct)
13017    }
13018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13019        let mut __tmp = BytesMut::new(bytes);
13020        #[allow(clippy::absurd_extreme_comparisons)]
13021        #[allow(unused_comparisons)]
13022        if __tmp.remaining() < Self::ENCODED_LEN {
13023            panic!(
13024                "buffer is too small (need {} bytes, but got {})",
13025                Self::ENCODED_LEN,
13026                __tmp.remaining(),
13027            )
13028        }
13029        __tmp.put_u64_le(self.uid);
13030        __tmp.put_u32_le(self.time_boot_ms);
13031        __tmp.put_u32_le(self.firmware_version);
13032        __tmp.put_u32_le(self.hardware_version);
13033        __tmp.put_f32_le(self.roll_min);
13034        __tmp.put_f32_le(self.roll_max);
13035        __tmp.put_f32_le(self.pitch_min);
13036        __tmp.put_f32_le(self.pitch_max);
13037        __tmp.put_f32_le(self.yaw_min);
13038        __tmp.put_f32_le(self.yaw_max);
13039        __tmp.put_u16_le(self.cap_flags.bits());
13040        __tmp.put_u16_le(self.custom_cap_flags);
13041        for val in &self.vendor_name {
13042            __tmp.put_u8(*val);
13043        }
13044        for val in &self.model_name {
13045            __tmp.put_u8(*val);
13046        }
13047        for val in &self.custom_name {
13048            __tmp.put_u8(*val);
13049        }
13050        if matches!(version, MavlinkVersion::V2) {
13051            __tmp.put_u8(self.gimbal_device_id);
13052            let len = __tmp.len();
13053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13054        } else {
13055            __tmp.len()
13056        }
13057    }
13058}
13059#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13060#[doc = ""]
13061#[doc = "ID: 284"]
13062#[derive(Debug, Clone, PartialEq)]
13063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13065#[cfg_attr(feature = "ts", derive(TS))]
13066#[cfg_attr(feature = "ts", ts(export))]
13067pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13068    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13069    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13070    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13071    pub q: [f32; 4],
13072    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13073    pub angular_velocity_x: f32,
13074    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13075    pub angular_velocity_y: f32,
13076    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13077    pub angular_velocity_z: f32,
13078    #[doc = "Low level gimbal flags."]
13079    pub flags: GimbalDeviceFlags,
13080    #[doc = "System ID"]
13081    pub target_system: u8,
13082    #[doc = "Component ID"]
13083    pub target_component: u8,
13084}
13085impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13086    pub const ENCODED_LEN: usize = 32usize;
13087    pub const DEFAULT: Self = Self {
13088        q: [0.0_f32; 4usize],
13089        angular_velocity_x: 0.0_f32,
13090        angular_velocity_y: 0.0_f32,
13091        angular_velocity_z: 0.0_f32,
13092        flags: GimbalDeviceFlags::DEFAULT,
13093        target_system: 0_u8,
13094        target_component: 0_u8,
13095    };
13096    #[cfg(feature = "arbitrary")]
13097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13098        use arbitrary::{Arbitrary, Unstructured};
13099        let mut buf = [0u8; 1024];
13100        rng.fill_bytes(&mut buf);
13101        let mut unstructured = Unstructured::new(&buf);
13102        Self::arbitrary(&mut unstructured).unwrap_or_default()
13103    }
13104}
13105impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13106    fn default() -> Self {
13107        Self::DEFAULT.clone()
13108    }
13109}
13110impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13111    type Message = MavMessage;
13112    const ID: u32 = 284u32;
13113    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13114    const EXTRA_CRC: u8 = 99u8;
13115    const ENCODED_LEN: usize = 32usize;
13116    fn deser(
13117        _version: MavlinkVersion,
13118        __input: &[u8],
13119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13120        let avail_len = __input.len();
13121        let mut payload_buf = [0; Self::ENCODED_LEN];
13122        let mut buf = if avail_len < Self::ENCODED_LEN {
13123            payload_buf[0..avail_len].copy_from_slice(__input);
13124            Bytes::new(&payload_buf)
13125        } else {
13126            Bytes::new(__input)
13127        };
13128        let mut __struct = Self::default();
13129        for v in &mut __struct.q {
13130            let val = buf.get_f32_le();
13131            *v = val;
13132        }
13133        __struct.angular_velocity_x = buf.get_f32_le();
13134        __struct.angular_velocity_y = buf.get_f32_le();
13135        __struct.angular_velocity_z = buf.get_f32_le();
13136        let tmp = buf.get_u16_le();
13137        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13138            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13139                flag_type: "GimbalDeviceFlags",
13140                value: tmp as u32,
13141            })?;
13142        __struct.target_system = buf.get_u8();
13143        __struct.target_component = buf.get_u8();
13144        Ok(__struct)
13145    }
13146    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13147        let mut __tmp = BytesMut::new(bytes);
13148        #[allow(clippy::absurd_extreme_comparisons)]
13149        #[allow(unused_comparisons)]
13150        if __tmp.remaining() < Self::ENCODED_LEN {
13151            panic!(
13152                "buffer is too small (need {} bytes, but got {})",
13153                Self::ENCODED_LEN,
13154                __tmp.remaining(),
13155            )
13156        }
13157        for val in &self.q {
13158            __tmp.put_f32_le(*val);
13159        }
13160        __tmp.put_f32_le(self.angular_velocity_x);
13161        __tmp.put_f32_le(self.angular_velocity_y);
13162        __tmp.put_f32_le(self.angular_velocity_z);
13163        __tmp.put_u16_le(self.flags.bits());
13164        __tmp.put_u8(self.target_system);
13165        __tmp.put_u8(self.target_component);
13166        if matches!(version, MavlinkVersion::V2) {
13167            let len = __tmp.len();
13168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13169        } else {
13170            __tmp.len()
13171        }
13172    }
13173}
13174#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13175#[doc = ""]
13176#[doc = "ID: 280"]
13177#[derive(Debug, Clone, PartialEq)]
13178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13180#[cfg_attr(feature = "ts", derive(TS))]
13181#[cfg_attr(feature = "ts", ts(export))]
13182pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13183    #[doc = "Timestamp (time since system boot)."]
13184    pub time_boot_ms: u32,
13185    #[doc = "Bitmap of gimbal capability flags."]
13186    pub cap_flags: GimbalManagerCapFlags,
13187    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13188    pub roll_min: f32,
13189    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13190    pub roll_max: f32,
13191    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13192    pub pitch_min: f32,
13193    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13194    pub pitch_max: f32,
13195    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13196    pub yaw_min: f32,
13197    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13198    pub yaw_max: f32,
13199    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13200    pub gimbal_device_id: u8,
13201}
13202impl GIMBAL_MANAGER_INFORMATION_DATA {
13203    pub const ENCODED_LEN: usize = 33usize;
13204    pub const DEFAULT: Self = Self {
13205        time_boot_ms: 0_u32,
13206        cap_flags: GimbalManagerCapFlags::DEFAULT,
13207        roll_min: 0.0_f32,
13208        roll_max: 0.0_f32,
13209        pitch_min: 0.0_f32,
13210        pitch_max: 0.0_f32,
13211        yaw_min: 0.0_f32,
13212        yaw_max: 0.0_f32,
13213        gimbal_device_id: 0_u8,
13214    };
13215    #[cfg(feature = "arbitrary")]
13216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13217        use arbitrary::{Arbitrary, Unstructured};
13218        let mut buf = [0u8; 1024];
13219        rng.fill_bytes(&mut buf);
13220        let mut unstructured = Unstructured::new(&buf);
13221        Self::arbitrary(&mut unstructured).unwrap_or_default()
13222    }
13223}
13224impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13225    fn default() -> Self {
13226        Self::DEFAULT.clone()
13227    }
13228}
13229impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13230    type Message = MavMessage;
13231    const ID: u32 = 280u32;
13232    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13233    const EXTRA_CRC: u8 = 70u8;
13234    const ENCODED_LEN: usize = 33usize;
13235    fn deser(
13236        _version: MavlinkVersion,
13237        __input: &[u8],
13238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13239        let avail_len = __input.len();
13240        let mut payload_buf = [0; Self::ENCODED_LEN];
13241        let mut buf = if avail_len < Self::ENCODED_LEN {
13242            payload_buf[0..avail_len].copy_from_slice(__input);
13243            Bytes::new(&payload_buf)
13244        } else {
13245            Bytes::new(__input)
13246        };
13247        let mut __struct = Self::default();
13248        __struct.time_boot_ms = buf.get_u32_le();
13249        let tmp = buf.get_u32_le();
13250        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13251            tmp & GimbalManagerCapFlags::all().bits(),
13252        )
13253        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13254            flag_type: "GimbalManagerCapFlags",
13255            value: tmp as u32,
13256        })?;
13257        __struct.roll_min = buf.get_f32_le();
13258        __struct.roll_max = buf.get_f32_le();
13259        __struct.pitch_min = buf.get_f32_le();
13260        __struct.pitch_max = buf.get_f32_le();
13261        __struct.yaw_min = buf.get_f32_le();
13262        __struct.yaw_max = buf.get_f32_le();
13263        __struct.gimbal_device_id = buf.get_u8();
13264        Ok(__struct)
13265    }
13266    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13267        let mut __tmp = BytesMut::new(bytes);
13268        #[allow(clippy::absurd_extreme_comparisons)]
13269        #[allow(unused_comparisons)]
13270        if __tmp.remaining() < Self::ENCODED_LEN {
13271            panic!(
13272                "buffer is too small (need {} bytes, but got {})",
13273                Self::ENCODED_LEN,
13274                __tmp.remaining(),
13275            )
13276        }
13277        __tmp.put_u32_le(self.time_boot_ms);
13278        __tmp.put_u32_le(self.cap_flags.bits());
13279        __tmp.put_f32_le(self.roll_min);
13280        __tmp.put_f32_le(self.roll_max);
13281        __tmp.put_f32_le(self.pitch_min);
13282        __tmp.put_f32_le(self.pitch_max);
13283        __tmp.put_f32_le(self.yaw_min);
13284        __tmp.put_f32_le(self.yaw_max);
13285        __tmp.put_u8(self.gimbal_device_id);
13286        if matches!(version, MavlinkVersion::V2) {
13287            let len = __tmp.len();
13288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13289        } else {
13290            __tmp.len()
13291        }
13292    }
13293}
13294#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13295#[doc = ""]
13296#[doc = "ID: 282"]
13297#[derive(Debug, Clone, PartialEq)]
13298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13300#[cfg_attr(feature = "ts", derive(TS))]
13301#[cfg_attr(feature = "ts", ts(export))]
13302pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13303    #[doc = "High level gimbal manager flags to use."]
13304    pub flags: GimbalManagerFlags,
13305    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13307    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13308    pub q: [f32; 4],
13309    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13310    pub angular_velocity_x: f32,
13311    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13312    pub angular_velocity_y: f32,
13313    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13314    pub angular_velocity_z: f32,
13315    #[doc = "System ID"]
13316    pub target_system: u8,
13317    #[doc = "Component ID"]
13318    pub target_component: u8,
13319    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13320    pub gimbal_device_id: u8,
13321}
13322impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13323    pub const ENCODED_LEN: usize = 35usize;
13324    pub const DEFAULT: Self = Self {
13325        flags: GimbalManagerFlags::DEFAULT,
13326        q: [0.0_f32; 4usize],
13327        angular_velocity_x: 0.0_f32,
13328        angular_velocity_y: 0.0_f32,
13329        angular_velocity_z: 0.0_f32,
13330        target_system: 0_u8,
13331        target_component: 0_u8,
13332        gimbal_device_id: 0_u8,
13333    };
13334    #[cfg(feature = "arbitrary")]
13335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13336        use arbitrary::{Arbitrary, Unstructured};
13337        let mut buf = [0u8; 1024];
13338        rng.fill_bytes(&mut buf);
13339        let mut unstructured = Unstructured::new(&buf);
13340        Self::arbitrary(&mut unstructured).unwrap_or_default()
13341    }
13342}
13343impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13344    fn default() -> Self {
13345        Self::DEFAULT.clone()
13346    }
13347}
13348impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13349    type Message = MavMessage;
13350    const ID: u32 = 282u32;
13351    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13352    const EXTRA_CRC: u8 = 123u8;
13353    const ENCODED_LEN: usize = 35usize;
13354    fn deser(
13355        _version: MavlinkVersion,
13356        __input: &[u8],
13357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13358        let avail_len = __input.len();
13359        let mut payload_buf = [0; Self::ENCODED_LEN];
13360        let mut buf = if avail_len < Self::ENCODED_LEN {
13361            payload_buf[0..avail_len].copy_from_slice(__input);
13362            Bytes::new(&payload_buf)
13363        } else {
13364            Bytes::new(__input)
13365        };
13366        let mut __struct = Self::default();
13367        let tmp = buf.get_u32_le();
13368        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13369            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13370                flag_type: "GimbalManagerFlags",
13371                value: tmp as u32,
13372            })?;
13373        for v in &mut __struct.q {
13374            let val = buf.get_f32_le();
13375            *v = val;
13376        }
13377        __struct.angular_velocity_x = buf.get_f32_le();
13378        __struct.angular_velocity_y = buf.get_f32_le();
13379        __struct.angular_velocity_z = buf.get_f32_le();
13380        __struct.target_system = buf.get_u8();
13381        __struct.target_component = buf.get_u8();
13382        __struct.gimbal_device_id = buf.get_u8();
13383        Ok(__struct)
13384    }
13385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13386        let mut __tmp = BytesMut::new(bytes);
13387        #[allow(clippy::absurd_extreme_comparisons)]
13388        #[allow(unused_comparisons)]
13389        if __tmp.remaining() < Self::ENCODED_LEN {
13390            panic!(
13391                "buffer is too small (need {} bytes, but got {})",
13392                Self::ENCODED_LEN,
13393                __tmp.remaining(),
13394            )
13395        }
13396        __tmp.put_u32_le(self.flags.bits());
13397        for val in &self.q {
13398            __tmp.put_f32_le(*val);
13399        }
13400        __tmp.put_f32_le(self.angular_velocity_x);
13401        __tmp.put_f32_le(self.angular_velocity_y);
13402        __tmp.put_f32_le(self.angular_velocity_z);
13403        __tmp.put_u8(self.target_system);
13404        __tmp.put_u8(self.target_component);
13405        __tmp.put_u8(self.gimbal_device_id);
13406        if matches!(version, MavlinkVersion::V2) {
13407            let len = __tmp.len();
13408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13409        } else {
13410            __tmp.len()
13411        }
13412    }
13413}
13414#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13415#[doc = ""]
13416#[doc = "ID: 288"]
13417#[derive(Debug, Clone, PartialEq)]
13418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13420#[cfg_attr(feature = "ts", derive(TS))]
13421#[cfg_attr(feature = "ts", ts(export))]
13422pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13423    #[doc = "High level gimbal manager flags."]
13424    pub flags: GimbalManagerFlags,
13425    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13426    pub pitch: f32,
13427    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13428    pub yaw: f32,
13429    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13430    pub pitch_rate: f32,
13431    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13432    pub yaw_rate: f32,
13433    #[doc = "System ID"]
13434    pub target_system: u8,
13435    #[doc = "Component ID"]
13436    pub target_component: u8,
13437    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13438    pub gimbal_device_id: u8,
13439}
13440impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13441    pub const ENCODED_LEN: usize = 23usize;
13442    pub const DEFAULT: Self = Self {
13443        flags: GimbalManagerFlags::DEFAULT,
13444        pitch: 0.0_f32,
13445        yaw: 0.0_f32,
13446        pitch_rate: 0.0_f32,
13447        yaw_rate: 0.0_f32,
13448        target_system: 0_u8,
13449        target_component: 0_u8,
13450        gimbal_device_id: 0_u8,
13451    };
13452    #[cfg(feature = "arbitrary")]
13453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13454        use arbitrary::{Arbitrary, Unstructured};
13455        let mut buf = [0u8; 1024];
13456        rng.fill_bytes(&mut buf);
13457        let mut unstructured = Unstructured::new(&buf);
13458        Self::arbitrary(&mut unstructured).unwrap_or_default()
13459    }
13460}
13461impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13462    fn default() -> Self {
13463        Self::DEFAULT.clone()
13464    }
13465}
13466impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13467    type Message = MavMessage;
13468    const ID: u32 = 288u32;
13469    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13470    const EXTRA_CRC: u8 = 20u8;
13471    const ENCODED_LEN: usize = 23usize;
13472    fn deser(
13473        _version: MavlinkVersion,
13474        __input: &[u8],
13475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13476        let avail_len = __input.len();
13477        let mut payload_buf = [0; Self::ENCODED_LEN];
13478        let mut buf = if avail_len < Self::ENCODED_LEN {
13479            payload_buf[0..avail_len].copy_from_slice(__input);
13480            Bytes::new(&payload_buf)
13481        } else {
13482            Bytes::new(__input)
13483        };
13484        let mut __struct = Self::default();
13485        let tmp = buf.get_u32_le();
13486        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13487            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13488                flag_type: "GimbalManagerFlags",
13489                value: tmp as u32,
13490            })?;
13491        __struct.pitch = buf.get_f32_le();
13492        __struct.yaw = buf.get_f32_le();
13493        __struct.pitch_rate = buf.get_f32_le();
13494        __struct.yaw_rate = buf.get_f32_le();
13495        __struct.target_system = buf.get_u8();
13496        __struct.target_component = buf.get_u8();
13497        __struct.gimbal_device_id = buf.get_u8();
13498        Ok(__struct)
13499    }
13500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13501        let mut __tmp = BytesMut::new(bytes);
13502        #[allow(clippy::absurd_extreme_comparisons)]
13503        #[allow(unused_comparisons)]
13504        if __tmp.remaining() < Self::ENCODED_LEN {
13505            panic!(
13506                "buffer is too small (need {} bytes, but got {})",
13507                Self::ENCODED_LEN,
13508                __tmp.remaining(),
13509            )
13510        }
13511        __tmp.put_u32_le(self.flags.bits());
13512        __tmp.put_f32_le(self.pitch);
13513        __tmp.put_f32_le(self.yaw);
13514        __tmp.put_f32_le(self.pitch_rate);
13515        __tmp.put_f32_le(self.yaw_rate);
13516        __tmp.put_u8(self.target_system);
13517        __tmp.put_u8(self.target_component);
13518        __tmp.put_u8(self.gimbal_device_id);
13519        if matches!(version, MavlinkVersion::V2) {
13520            let len = __tmp.len();
13521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13522        } else {
13523            __tmp.len()
13524        }
13525    }
13526}
13527#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13528#[doc = ""]
13529#[doc = "ID: 287"]
13530#[derive(Debug, Clone, PartialEq)]
13531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13533#[cfg_attr(feature = "ts", derive(TS))]
13534#[cfg_attr(feature = "ts", ts(export))]
13535pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13536    #[doc = "High level gimbal manager flags to use."]
13537    pub flags: GimbalManagerFlags,
13538    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13539    pub pitch: f32,
13540    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13541    pub yaw: f32,
13542    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13543    pub pitch_rate: f32,
13544    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13545    pub yaw_rate: f32,
13546    #[doc = "System ID"]
13547    pub target_system: u8,
13548    #[doc = "Component ID"]
13549    pub target_component: u8,
13550    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13551    pub gimbal_device_id: u8,
13552}
13553impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13554    pub const ENCODED_LEN: usize = 23usize;
13555    pub const DEFAULT: Self = Self {
13556        flags: GimbalManagerFlags::DEFAULT,
13557        pitch: 0.0_f32,
13558        yaw: 0.0_f32,
13559        pitch_rate: 0.0_f32,
13560        yaw_rate: 0.0_f32,
13561        target_system: 0_u8,
13562        target_component: 0_u8,
13563        gimbal_device_id: 0_u8,
13564    };
13565    #[cfg(feature = "arbitrary")]
13566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13567        use arbitrary::{Arbitrary, Unstructured};
13568        let mut buf = [0u8; 1024];
13569        rng.fill_bytes(&mut buf);
13570        let mut unstructured = Unstructured::new(&buf);
13571        Self::arbitrary(&mut unstructured).unwrap_or_default()
13572    }
13573}
13574impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13575    fn default() -> Self {
13576        Self::DEFAULT.clone()
13577    }
13578}
13579impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13580    type Message = MavMessage;
13581    const ID: u32 = 287u32;
13582    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13583    const EXTRA_CRC: u8 = 1u8;
13584    const ENCODED_LEN: usize = 23usize;
13585    fn deser(
13586        _version: MavlinkVersion,
13587        __input: &[u8],
13588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13589        let avail_len = __input.len();
13590        let mut payload_buf = [0; Self::ENCODED_LEN];
13591        let mut buf = if avail_len < Self::ENCODED_LEN {
13592            payload_buf[0..avail_len].copy_from_slice(__input);
13593            Bytes::new(&payload_buf)
13594        } else {
13595            Bytes::new(__input)
13596        };
13597        let mut __struct = Self::default();
13598        let tmp = buf.get_u32_le();
13599        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13600            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13601                flag_type: "GimbalManagerFlags",
13602                value: tmp as u32,
13603            })?;
13604        __struct.pitch = buf.get_f32_le();
13605        __struct.yaw = buf.get_f32_le();
13606        __struct.pitch_rate = buf.get_f32_le();
13607        __struct.yaw_rate = buf.get_f32_le();
13608        __struct.target_system = buf.get_u8();
13609        __struct.target_component = buf.get_u8();
13610        __struct.gimbal_device_id = buf.get_u8();
13611        Ok(__struct)
13612    }
13613    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13614        let mut __tmp = BytesMut::new(bytes);
13615        #[allow(clippy::absurd_extreme_comparisons)]
13616        #[allow(unused_comparisons)]
13617        if __tmp.remaining() < Self::ENCODED_LEN {
13618            panic!(
13619                "buffer is too small (need {} bytes, but got {})",
13620                Self::ENCODED_LEN,
13621                __tmp.remaining(),
13622            )
13623        }
13624        __tmp.put_u32_le(self.flags.bits());
13625        __tmp.put_f32_le(self.pitch);
13626        __tmp.put_f32_le(self.yaw);
13627        __tmp.put_f32_le(self.pitch_rate);
13628        __tmp.put_f32_le(self.yaw_rate);
13629        __tmp.put_u8(self.target_system);
13630        __tmp.put_u8(self.target_component);
13631        __tmp.put_u8(self.gimbal_device_id);
13632        if matches!(version, MavlinkVersion::V2) {
13633            let len = __tmp.len();
13634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13635        } else {
13636            __tmp.len()
13637        }
13638    }
13639}
13640#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13641#[doc = ""]
13642#[doc = "ID: 281"]
13643#[derive(Debug, Clone, PartialEq)]
13644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13646#[cfg_attr(feature = "ts", derive(TS))]
13647#[cfg_attr(feature = "ts", ts(export))]
13648pub struct GIMBAL_MANAGER_STATUS_DATA {
13649    #[doc = "Timestamp (time since system boot)."]
13650    pub time_boot_ms: u32,
13651    #[doc = "High level gimbal manager flags currently applied."]
13652    pub flags: GimbalManagerFlags,
13653    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13654    pub gimbal_device_id: u8,
13655    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13656    pub primary_control_sysid: u8,
13657    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13658    pub primary_control_compid: u8,
13659    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13660    pub secondary_control_sysid: u8,
13661    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13662    pub secondary_control_compid: u8,
13663}
13664impl GIMBAL_MANAGER_STATUS_DATA {
13665    pub const ENCODED_LEN: usize = 13usize;
13666    pub const DEFAULT: Self = Self {
13667        time_boot_ms: 0_u32,
13668        flags: GimbalManagerFlags::DEFAULT,
13669        gimbal_device_id: 0_u8,
13670        primary_control_sysid: 0_u8,
13671        primary_control_compid: 0_u8,
13672        secondary_control_sysid: 0_u8,
13673        secondary_control_compid: 0_u8,
13674    };
13675    #[cfg(feature = "arbitrary")]
13676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13677        use arbitrary::{Arbitrary, Unstructured};
13678        let mut buf = [0u8; 1024];
13679        rng.fill_bytes(&mut buf);
13680        let mut unstructured = Unstructured::new(&buf);
13681        Self::arbitrary(&mut unstructured).unwrap_or_default()
13682    }
13683}
13684impl Default for GIMBAL_MANAGER_STATUS_DATA {
13685    fn default() -> Self {
13686        Self::DEFAULT.clone()
13687    }
13688}
13689impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13690    type Message = MavMessage;
13691    const ID: u32 = 281u32;
13692    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13693    const EXTRA_CRC: u8 = 48u8;
13694    const ENCODED_LEN: usize = 13usize;
13695    fn deser(
13696        _version: MavlinkVersion,
13697        __input: &[u8],
13698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13699        let avail_len = __input.len();
13700        let mut payload_buf = [0; Self::ENCODED_LEN];
13701        let mut buf = if avail_len < Self::ENCODED_LEN {
13702            payload_buf[0..avail_len].copy_from_slice(__input);
13703            Bytes::new(&payload_buf)
13704        } else {
13705            Bytes::new(__input)
13706        };
13707        let mut __struct = Self::default();
13708        __struct.time_boot_ms = buf.get_u32_le();
13709        let tmp = buf.get_u32_le();
13710        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13711            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13712                flag_type: "GimbalManagerFlags",
13713                value: tmp as u32,
13714            })?;
13715        __struct.gimbal_device_id = buf.get_u8();
13716        __struct.primary_control_sysid = buf.get_u8();
13717        __struct.primary_control_compid = buf.get_u8();
13718        __struct.secondary_control_sysid = buf.get_u8();
13719        __struct.secondary_control_compid = buf.get_u8();
13720        Ok(__struct)
13721    }
13722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13723        let mut __tmp = BytesMut::new(bytes);
13724        #[allow(clippy::absurd_extreme_comparisons)]
13725        #[allow(unused_comparisons)]
13726        if __tmp.remaining() < Self::ENCODED_LEN {
13727            panic!(
13728                "buffer is too small (need {} bytes, but got {})",
13729                Self::ENCODED_LEN,
13730                __tmp.remaining(),
13731            )
13732        }
13733        __tmp.put_u32_le(self.time_boot_ms);
13734        __tmp.put_u32_le(self.flags.bits());
13735        __tmp.put_u8(self.gimbal_device_id);
13736        __tmp.put_u8(self.primary_control_sysid);
13737        __tmp.put_u8(self.primary_control_compid);
13738        __tmp.put_u8(self.secondary_control_sysid);
13739        __tmp.put_u8(self.secondary_control_compid);
13740        if matches!(version, MavlinkVersion::V2) {
13741            let len = __tmp.len();
13742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13743        } else {
13744            __tmp.len()
13745        }
13746    }
13747}
13748#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13749#[doc = ""]
13750#[doc = "ID: 33"]
13751#[derive(Debug, Clone, PartialEq)]
13752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13754#[cfg_attr(feature = "ts", derive(TS))]
13755#[cfg_attr(feature = "ts", ts(export))]
13756pub struct GLOBAL_POSITION_INT_DATA {
13757    #[doc = "Timestamp (time since system boot)."]
13758    pub time_boot_ms: u32,
13759    #[doc = "Latitude, expressed"]
13760    pub lat: i32,
13761    #[doc = "Longitude, expressed"]
13762    pub lon: i32,
13763    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13764    pub alt: i32,
13765    #[doc = "Altitude above home"]
13766    pub relative_alt: i32,
13767    #[doc = "Ground X Speed (Latitude, positive north)"]
13768    pub vx: i16,
13769    #[doc = "Ground Y Speed (Longitude, positive east)"]
13770    pub vy: i16,
13771    #[doc = "Ground Z Speed (Altitude, positive down)"]
13772    pub vz: i16,
13773    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13774    pub hdg: u16,
13775}
13776impl GLOBAL_POSITION_INT_DATA {
13777    pub const ENCODED_LEN: usize = 28usize;
13778    pub const DEFAULT: Self = Self {
13779        time_boot_ms: 0_u32,
13780        lat: 0_i32,
13781        lon: 0_i32,
13782        alt: 0_i32,
13783        relative_alt: 0_i32,
13784        vx: 0_i16,
13785        vy: 0_i16,
13786        vz: 0_i16,
13787        hdg: 0_u16,
13788    };
13789    #[cfg(feature = "arbitrary")]
13790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13791        use arbitrary::{Arbitrary, Unstructured};
13792        let mut buf = [0u8; 1024];
13793        rng.fill_bytes(&mut buf);
13794        let mut unstructured = Unstructured::new(&buf);
13795        Self::arbitrary(&mut unstructured).unwrap_or_default()
13796    }
13797}
13798impl Default for GLOBAL_POSITION_INT_DATA {
13799    fn default() -> Self {
13800        Self::DEFAULT.clone()
13801    }
13802}
13803impl MessageData for GLOBAL_POSITION_INT_DATA {
13804    type Message = MavMessage;
13805    const ID: u32 = 33u32;
13806    const NAME: &'static str = "GLOBAL_POSITION_INT";
13807    const EXTRA_CRC: u8 = 104u8;
13808    const ENCODED_LEN: usize = 28usize;
13809    fn deser(
13810        _version: MavlinkVersion,
13811        __input: &[u8],
13812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13813        let avail_len = __input.len();
13814        let mut payload_buf = [0; Self::ENCODED_LEN];
13815        let mut buf = if avail_len < Self::ENCODED_LEN {
13816            payload_buf[0..avail_len].copy_from_slice(__input);
13817            Bytes::new(&payload_buf)
13818        } else {
13819            Bytes::new(__input)
13820        };
13821        let mut __struct = Self::default();
13822        __struct.time_boot_ms = buf.get_u32_le();
13823        __struct.lat = buf.get_i32_le();
13824        __struct.lon = buf.get_i32_le();
13825        __struct.alt = buf.get_i32_le();
13826        __struct.relative_alt = buf.get_i32_le();
13827        __struct.vx = buf.get_i16_le();
13828        __struct.vy = buf.get_i16_le();
13829        __struct.vz = buf.get_i16_le();
13830        __struct.hdg = buf.get_u16_le();
13831        Ok(__struct)
13832    }
13833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13834        let mut __tmp = BytesMut::new(bytes);
13835        #[allow(clippy::absurd_extreme_comparisons)]
13836        #[allow(unused_comparisons)]
13837        if __tmp.remaining() < Self::ENCODED_LEN {
13838            panic!(
13839                "buffer is too small (need {} bytes, but got {})",
13840                Self::ENCODED_LEN,
13841                __tmp.remaining(),
13842            )
13843        }
13844        __tmp.put_u32_le(self.time_boot_ms);
13845        __tmp.put_i32_le(self.lat);
13846        __tmp.put_i32_le(self.lon);
13847        __tmp.put_i32_le(self.alt);
13848        __tmp.put_i32_le(self.relative_alt);
13849        __tmp.put_i16_le(self.vx);
13850        __tmp.put_i16_le(self.vy);
13851        __tmp.put_i16_le(self.vz);
13852        __tmp.put_u16_le(self.hdg);
13853        if matches!(version, MavlinkVersion::V2) {
13854            let len = __tmp.len();
13855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13856        } else {
13857            __tmp.len()
13858        }
13859    }
13860}
13861#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13862#[doc = ""]
13863#[doc = "ID: 63"]
13864#[derive(Debug, Clone, PartialEq)]
13865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13867#[cfg_attr(feature = "ts", derive(TS))]
13868#[cfg_attr(feature = "ts", ts(export))]
13869pub struct GLOBAL_POSITION_INT_COV_DATA {
13870    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13871    pub time_usec: u64,
13872    #[doc = "Latitude"]
13873    pub lat: i32,
13874    #[doc = "Longitude"]
13875    pub lon: i32,
13876    #[doc = "Altitude in meters above MSL"]
13877    pub alt: i32,
13878    #[doc = "Altitude above ground"]
13879    pub relative_alt: i32,
13880    #[doc = "Ground X Speed (Latitude)"]
13881    pub vx: f32,
13882    #[doc = "Ground Y Speed (Longitude)"]
13883    pub vy: f32,
13884    #[doc = "Ground Z Speed (Altitude)"]
13885    pub vz: f32,
13886    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13888    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13889    pub covariance: [f32; 36],
13890    #[doc = "Class id of the estimator this estimate originated from."]
13891    pub estimator_type: MavEstimatorType,
13892}
13893impl GLOBAL_POSITION_INT_COV_DATA {
13894    pub const ENCODED_LEN: usize = 181usize;
13895    pub const DEFAULT: Self = Self {
13896        time_usec: 0_u64,
13897        lat: 0_i32,
13898        lon: 0_i32,
13899        alt: 0_i32,
13900        relative_alt: 0_i32,
13901        vx: 0.0_f32,
13902        vy: 0.0_f32,
13903        vz: 0.0_f32,
13904        covariance: [0.0_f32; 36usize],
13905        estimator_type: MavEstimatorType::DEFAULT,
13906    };
13907    #[cfg(feature = "arbitrary")]
13908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13909        use arbitrary::{Arbitrary, Unstructured};
13910        let mut buf = [0u8; 1024];
13911        rng.fill_bytes(&mut buf);
13912        let mut unstructured = Unstructured::new(&buf);
13913        Self::arbitrary(&mut unstructured).unwrap_or_default()
13914    }
13915}
13916impl Default for GLOBAL_POSITION_INT_COV_DATA {
13917    fn default() -> Self {
13918        Self::DEFAULT.clone()
13919    }
13920}
13921impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13922    type Message = MavMessage;
13923    const ID: u32 = 63u32;
13924    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13925    const EXTRA_CRC: u8 = 119u8;
13926    const ENCODED_LEN: usize = 181usize;
13927    fn deser(
13928        _version: MavlinkVersion,
13929        __input: &[u8],
13930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13931        let avail_len = __input.len();
13932        let mut payload_buf = [0; Self::ENCODED_LEN];
13933        let mut buf = if avail_len < Self::ENCODED_LEN {
13934            payload_buf[0..avail_len].copy_from_slice(__input);
13935            Bytes::new(&payload_buf)
13936        } else {
13937            Bytes::new(__input)
13938        };
13939        let mut __struct = Self::default();
13940        __struct.time_usec = buf.get_u64_le();
13941        __struct.lat = buf.get_i32_le();
13942        __struct.lon = buf.get_i32_le();
13943        __struct.alt = buf.get_i32_le();
13944        __struct.relative_alt = buf.get_i32_le();
13945        __struct.vx = buf.get_f32_le();
13946        __struct.vy = buf.get_f32_le();
13947        __struct.vz = buf.get_f32_le();
13948        for v in &mut __struct.covariance {
13949            let val = buf.get_f32_le();
13950            *v = val;
13951        }
13952        let tmp = buf.get_u8();
13953        __struct.estimator_type =
13954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13955                enum_type: "MavEstimatorType",
13956                value: tmp as u32,
13957            })?;
13958        Ok(__struct)
13959    }
13960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13961        let mut __tmp = BytesMut::new(bytes);
13962        #[allow(clippy::absurd_extreme_comparisons)]
13963        #[allow(unused_comparisons)]
13964        if __tmp.remaining() < Self::ENCODED_LEN {
13965            panic!(
13966                "buffer is too small (need {} bytes, but got {})",
13967                Self::ENCODED_LEN,
13968                __tmp.remaining(),
13969            )
13970        }
13971        __tmp.put_u64_le(self.time_usec);
13972        __tmp.put_i32_le(self.lat);
13973        __tmp.put_i32_le(self.lon);
13974        __tmp.put_i32_le(self.alt);
13975        __tmp.put_i32_le(self.relative_alt);
13976        __tmp.put_f32_le(self.vx);
13977        __tmp.put_f32_le(self.vy);
13978        __tmp.put_f32_le(self.vz);
13979        for val in &self.covariance {
13980            __tmp.put_f32_le(*val);
13981        }
13982        __tmp.put_u8(self.estimator_type as u8);
13983        if matches!(version, MavlinkVersion::V2) {
13984            let len = __tmp.len();
13985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13986        } else {
13987            __tmp.len()
13988        }
13989    }
13990}
13991#[doc = "Global position/attitude estimate from a vision source."]
13992#[doc = ""]
13993#[doc = "ID: 101"]
13994#[derive(Debug, Clone, PartialEq)]
13995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13997#[cfg_attr(feature = "ts", derive(TS))]
13998#[cfg_attr(feature = "ts", ts(export))]
13999pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14000    #[doc = "Timestamp (UNIX time or since system boot)"]
14001    pub usec: u64,
14002    #[doc = "Global X position"]
14003    pub x: f32,
14004    #[doc = "Global Y position"]
14005    pub y: f32,
14006    #[doc = "Global Z position"]
14007    pub z: f32,
14008    #[doc = "Roll angle"]
14009    pub roll: f32,
14010    #[doc = "Pitch angle"]
14011    pub pitch: f32,
14012    #[doc = "Yaw angle"]
14013    pub yaw: f32,
14014    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14016    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14017    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14018    pub covariance: [f32; 21],
14019    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14021    pub reset_counter: u8,
14022}
14023impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14024    pub const ENCODED_LEN: usize = 117usize;
14025    pub const DEFAULT: Self = Self {
14026        usec: 0_u64,
14027        x: 0.0_f32,
14028        y: 0.0_f32,
14029        z: 0.0_f32,
14030        roll: 0.0_f32,
14031        pitch: 0.0_f32,
14032        yaw: 0.0_f32,
14033        covariance: [0.0_f32; 21usize],
14034        reset_counter: 0_u8,
14035    };
14036    #[cfg(feature = "arbitrary")]
14037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14038        use arbitrary::{Arbitrary, Unstructured};
14039        let mut buf = [0u8; 1024];
14040        rng.fill_bytes(&mut buf);
14041        let mut unstructured = Unstructured::new(&buf);
14042        Self::arbitrary(&mut unstructured).unwrap_or_default()
14043    }
14044}
14045impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14046    fn default() -> Self {
14047        Self::DEFAULT.clone()
14048    }
14049}
14050impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14051    type Message = MavMessage;
14052    const ID: u32 = 101u32;
14053    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14054    const EXTRA_CRC: u8 = 102u8;
14055    const ENCODED_LEN: usize = 117usize;
14056    fn deser(
14057        _version: MavlinkVersion,
14058        __input: &[u8],
14059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14060        let avail_len = __input.len();
14061        let mut payload_buf = [0; Self::ENCODED_LEN];
14062        let mut buf = if avail_len < Self::ENCODED_LEN {
14063            payload_buf[0..avail_len].copy_from_slice(__input);
14064            Bytes::new(&payload_buf)
14065        } else {
14066            Bytes::new(__input)
14067        };
14068        let mut __struct = Self::default();
14069        __struct.usec = buf.get_u64_le();
14070        __struct.x = buf.get_f32_le();
14071        __struct.y = buf.get_f32_le();
14072        __struct.z = buf.get_f32_le();
14073        __struct.roll = buf.get_f32_le();
14074        __struct.pitch = buf.get_f32_le();
14075        __struct.yaw = buf.get_f32_le();
14076        for v in &mut __struct.covariance {
14077            let val = buf.get_f32_le();
14078            *v = val;
14079        }
14080        __struct.reset_counter = buf.get_u8();
14081        Ok(__struct)
14082    }
14083    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14084        let mut __tmp = BytesMut::new(bytes);
14085        #[allow(clippy::absurd_extreme_comparisons)]
14086        #[allow(unused_comparisons)]
14087        if __tmp.remaining() < Self::ENCODED_LEN {
14088            panic!(
14089                "buffer is too small (need {} bytes, but got {})",
14090                Self::ENCODED_LEN,
14091                __tmp.remaining(),
14092            )
14093        }
14094        __tmp.put_u64_le(self.usec);
14095        __tmp.put_f32_le(self.x);
14096        __tmp.put_f32_le(self.y);
14097        __tmp.put_f32_le(self.z);
14098        __tmp.put_f32_le(self.roll);
14099        __tmp.put_f32_le(self.pitch);
14100        __tmp.put_f32_le(self.yaw);
14101        if matches!(version, MavlinkVersion::V2) {
14102            for val in &self.covariance {
14103                __tmp.put_f32_le(*val);
14104            }
14105            __tmp.put_u8(self.reset_counter);
14106            let len = __tmp.len();
14107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14108        } else {
14109            __tmp.len()
14110        }
14111    }
14112}
14113#[doc = "Second GPS data."]
14114#[doc = ""]
14115#[doc = "ID: 124"]
14116#[derive(Debug, Clone, PartialEq)]
14117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14119#[cfg_attr(feature = "ts", derive(TS))]
14120#[cfg_attr(feature = "ts", ts(export))]
14121pub struct GPS2_RAW_DATA {
14122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14123    pub time_usec: u64,
14124    #[doc = "Latitude (WGS84)"]
14125    pub lat: i32,
14126    #[doc = "Longitude (WGS84)"]
14127    pub lon: i32,
14128    #[doc = "Altitude (MSL). Positive for up."]
14129    pub alt: i32,
14130    #[doc = "Age of DGPS info"]
14131    pub dgps_age: u32,
14132    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14133    pub eph: u16,
14134    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14135    pub epv: u16,
14136    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14137    pub vel: u16,
14138    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14139    pub cog: u16,
14140    #[doc = "GPS fix type."]
14141    pub fix_type: GpsFixType,
14142    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14143    pub satellites_visible: u8,
14144    #[doc = "Number of DGPS satellites"]
14145    pub dgps_numch: u8,
14146    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14147    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14148    pub yaw: u16,
14149    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14150    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14151    pub alt_ellipsoid: i32,
14152    #[doc = "Position uncertainty."]
14153    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14154    pub h_acc: u32,
14155    #[doc = "Altitude uncertainty."]
14156    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14157    pub v_acc: u32,
14158    #[doc = "Speed uncertainty."]
14159    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14160    pub vel_acc: u32,
14161    #[doc = "Heading / track uncertainty"]
14162    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14163    pub hdg_acc: u32,
14164}
14165impl GPS2_RAW_DATA {
14166    pub const ENCODED_LEN: usize = 57usize;
14167    pub const DEFAULT: Self = Self {
14168        time_usec: 0_u64,
14169        lat: 0_i32,
14170        lon: 0_i32,
14171        alt: 0_i32,
14172        dgps_age: 0_u32,
14173        eph: 0_u16,
14174        epv: 0_u16,
14175        vel: 0_u16,
14176        cog: 0_u16,
14177        fix_type: GpsFixType::DEFAULT,
14178        satellites_visible: 0_u8,
14179        dgps_numch: 0_u8,
14180        yaw: 0_u16,
14181        alt_ellipsoid: 0_i32,
14182        h_acc: 0_u32,
14183        v_acc: 0_u32,
14184        vel_acc: 0_u32,
14185        hdg_acc: 0_u32,
14186    };
14187    #[cfg(feature = "arbitrary")]
14188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14189        use arbitrary::{Arbitrary, Unstructured};
14190        let mut buf = [0u8; 1024];
14191        rng.fill_bytes(&mut buf);
14192        let mut unstructured = Unstructured::new(&buf);
14193        Self::arbitrary(&mut unstructured).unwrap_or_default()
14194    }
14195}
14196impl Default for GPS2_RAW_DATA {
14197    fn default() -> Self {
14198        Self::DEFAULT.clone()
14199    }
14200}
14201impl MessageData for GPS2_RAW_DATA {
14202    type Message = MavMessage;
14203    const ID: u32 = 124u32;
14204    const NAME: &'static str = "GPS2_RAW";
14205    const EXTRA_CRC: u8 = 87u8;
14206    const ENCODED_LEN: usize = 57usize;
14207    fn deser(
14208        _version: MavlinkVersion,
14209        __input: &[u8],
14210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14211        let avail_len = __input.len();
14212        let mut payload_buf = [0; Self::ENCODED_LEN];
14213        let mut buf = if avail_len < Self::ENCODED_LEN {
14214            payload_buf[0..avail_len].copy_from_slice(__input);
14215            Bytes::new(&payload_buf)
14216        } else {
14217            Bytes::new(__input)
14218        };
14219        let mut __struct = Self::default();
14220        __struct.time_usec = buf.get_u64_le();
14221        __struct.lat = buf.get_i32_le();
14222        __struct.lon = buf.get_i32_le();
14223        __struct.alt = buf.get_i32_le();
14224        __struct.dgps_age = buf.get_u32_le();
14225        __struct.eph = buf.get_u16_le();
14226        __struct.epv = buf.get_u16_le();
14227        __struct.vel = buf.get_u16_le();
14228        __struct.cog = buf.get_u16_le();
14229        let tmp = buf.get_u8();
14230        __struct.fix_type =
14231            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14232                enum_type: "GpsFixType",
14233                value: tmp as u32,
14234            })?;
14235        __struct.satellites_visible = buf.get_u8();
14236        __struct.dgps_numch = buf.get_u8();
14237        __struct.yaw = buf.get_u16_le();
14238        __struct.alt_ellipsoid = buf.get_i32_le();
14239        __struct.h_acc = buf.get_u32_le();
14240        __struct.v_acc = buf.get_u32_le();
14241        __struct.vel_acc = buf.get_u32_le();
14242        __struct.hdg_acc = buf.get_u32_le();
14243        Ok(__struct)
14244    }
14245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14246        let mut __tmp = BytesMut::new(bytes);
14247        #[allow(clippy::absurd_extreme_comparisons)]
14248        #[allow(unused_comparisons)]
14249        if __tmp.remaining() < Self::ENCODED_LEN {
14250            panic!(
14251                "buffer is too small (need {} bytes, but got {})",
14252                Self::ENCODED_LEN,
14253                __tmp.remaining(),
14254            )
14255        }
14256        __tmp.put_u64_le(self.time_usec);
14257        __tmp.put_i32_le(self.lat);
14258        __tmp.put_i32_le(self.lon);
14259        __tmp.put_i32_le(self.alt);
14260        __tmp.put_u32_le(self.dgps_age);
14261        __tmp.put_u16_le(self.eph);
14262        __tmp.put_u16_le(self.epv);
14263        __tmp.put_u16_le(self.vel);
14264        __tmp.put_u16_le(self.cog);
14265        __tmp.put_u8(self.fix_type as u8);
14266        __tmp.put_u8(self.satellites_visible);
14267        __tmp.put_u8(self.dgps_numch);
14268        if matches!(version, MavlinkVersion::V2) {
14269            __tmp.put_u16_le(self.yaw);
14270            __tmp.put_i32_le(self.alt_ellipsoid);
14271            __tmp.put_u32_le(self.h_acc);
14272            __tmp.put_u32_le(self.v_acc);
14273            __tmp.put_u32_le(self.vel_acc);
14274            __tmp.put_u32_le(self.hdg_acc);
14275            let len = __tmp.len();
14276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14277        } else {
14278            __tmp.len()
14279        }
14280    }
14281}
14282#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14283#[doc = ""]
14284#[doc = "ID: 128"]
14285#[derive(Debug, Clone, PartialEq)]
14286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14288#[cfg_attr(feature = "ts", derive(TS))]
14289#[cfg_attr(feature = "ts", ts(export))]
14290pub struct GPS2_RTK_DATA {
14291    #[doc = "Time since boot of last baseline message received."]
14292    pub time_last_baseline_ms: u32,
14293    #[doc = "GPS Time of Week of last baseline"]
14294    pub tow: u32,
14295    #[doc = "Current baseline in ECEF x or NED north component."]
14296    pub baseline_a_mm: i32,
14297    #[doc = "Current baseline in ECEF y or NED east component."]
14298    pub baseline_b_mm: i32,
14299    #[doc = "Current baseline in ECEF z or NED down component."]
14300    pub baseline_c_mm: i32,
14301    #[doc = "Current estimate of baseline accuracy."]
14302    pub accuracy: u32,
14303    #[doc = "Current number of integer ambiguity hypotheses."]
14304    pub iar_num_hypotheses: i32,
14305    #[doc = "GPS Week Number of last baseline"]
14306    pub wn: u16,
14307    #[doc = "Identification of connected RTK receiver."]
14308    pub rtk_receiver_id: u8,
14309    #[doc = "GPS-specific health report for RTK data."]
14310    pub rtk_health: u8,
14311    #[doc = "Rate of baseline messages being received by GPS"]
14312    pub rtk_rate: u8,
14313    #[doc = "Current number of sats used for RTK calculation."]
14314    pub nsats: u8,
14315    #[doc = "Coordinate system of baseline"]
14316    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14317}
14318impl GPS2_RTK_DATA {
14319    pub const ENCODED_LEN: usize = 35usize;
14320    pub const DEFAULT: Self = Self {
14321        time_last_baseline_ms: 0_u32,
14322        tow: 0_u32,
14323        baseline_a_mm: 0_i32,
14324        baseline_b_mm: 0_i32,
14325        baseline_c_mm: 0_i32,
14326        accuracy: 0_u32,
14327        iar_num_hypotheses: 0_i32,
14328        wn: 0_u16,
14329        rtk_receiver_id: 0_u8,
14330        rtk_health: 0_u8,
14331        rtk_rate: 0_u8,
14332        nsats: 0_u8,
14333        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14334    };
14335    #[cfg(feature = "arbitrary")]
14336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14337        use arbitrary::{Arbitrary, Unstructured};
14338        let mut buf = [0u8; 1024];
14339        rng.fill_bytes(&mut buf);
14340        let mut unstructured = Unstructured::new(&buf);
14341        Self::arbitrary(&mut unstructured).unwrap_or_default()
14342    }
14343}
14344impl Default for GPS2_RTK_DATA {
14345    fn default() -> Self {
14346        Self::DEFAULT.clone()
14347    }
14348}
14349impl MessageData for GPS2_RTK_DATA {
14350    type Message = MavMessage;
14351    const ID: u32 = 128u32;
14352    const NAME: &'static str = "GPS2_RTK";
14353    const EXTRA_CRC: u8 = 226u8;
14354    const ENCODED_LEN: usize = 35usize;
14355    fn deser(
14356        _version: MavlinkVersion,
14357        __input: &[u8],
14358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14359        let avail_len = __input.len();
14360        let mut payload_buf = [0; Self::ENCODED_LEN];
14361        let mut buf = if avail_len < Self::ENCODED_LEN {
14362            payload_buf[0..avail_len].copy_from_slice(__input);
14363            Bytes::new(&payload_buf)
14364        } else {
14365            Bytes::new(__input)
14366        };
14367        let mut __struct = Self::default();
14368        __struct.time_last_baseline_ms = buf.get_u32_le();
14369        __struct.tow = buf.get_u32_le();
14370        __struct.baseline_a_mm = buf.get_i32_le();
14371        __struct.baseline_b_mm = buf.get_i32_le();
14372        __struct.baseline_c_mm = buf.get_i32_le();
14373        __struct.accuracy = buf.get_u32_le();
14374        __struct.iar_num_hypotheses = buf.get_i32_le();
14375        __struct.wn = buf.get_u16_le();
14376        __struct.rtk_receiver_id = buf.get_u8();
14377        __struct.rtk_health = buf.get_u8();
14378        __struct.rtk_rate = buf.get_u8();
14379        __struct.nsats = buf.get_u8();
14380        let tmp = buf.get_u8();
14381        __struct.baseline_coords_type =
14382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14383                enum_type: "RtkBaselineCoordinateSystem",
14384                value: tmp as u32,
14385            })?;
14386        Ok(__struct)
14387    }
14388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14389        let mut __tmp = BytesMut::new(bytes);
14390        #[allow(clippy::absurd_extreme_comparisons)]
14391        #[allow(unused_comparisons)]
14392        if __tmp.remaining() < Self::ENCODED_LEN {
14393            panic!(
14394                "buffer is too small (need {} bytes, but got {})",
14395                Self::ENCODED_LEN,
14396                __tmp.remaining(),
14397            )
14398        }
14399        __tmp.put_u32_le(self.time_last_baseline_ms);
14400        __tmp.put_u32_le(self.tow);
14401        __tmp.put_i32_le(self.baseline_a_mm);
14402        __tmp.put_i32_le(self.baseline_b_mm);
14403        __tmp.put_i32_le(self.baseline_c_mm);
14404        __tmp.put_u32_le(self.accuracy);
14405        __tmp.put_i32_le(self.iar_num_hypotheses);
14406        __tmp.put_u16_le(self.wn);
14407        __tmp.put_u8(self.rtk_receiver_id);
14408        __tmp.put_u8(self.rtk_health);
14409        __tmp.put_u8(self.rtk_rate);
14410        __tmp.put_u8(self.nsats);
14411        __tmp.put_u8(self.baseline_coords_type as u8);
14412        if matches!(version, MavlinkVersion::V2) {
14413            let len = __tmp.len();
14414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14415        } else {
14416            __tmp.len()
14417        }
14418    }
14419}
14420#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14421#[doc = ""]
14422#[doc = "ID: 49"]
14423#[derive(Debug, Clone, PartialEq)]
14424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14426#[cfg_attr(feature = "ts", derive(TS))]
14427#[cfg_attr(feature = "ts", ts(export))]
14428pub struct GPS_GLOBAL_ORIGIN_DATA {
14429    #[doc = "Latitude (WGS84)"]
14430    pub latitude: i32,
14431    #[doc = "Longitude (WGS84)"]
14432    pub longitude: i32,
14433    #[doc = "Altitude (MSL). Positive for up."]
14434    pub altitude: i32,
14435    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14437    pub time_usec: u64,
14438}
14439impl GPS_GLOBAL_ORIGIN_DATA {
14440    pub const ENCODED_LEN: usize = 20usize;
14441    pub const DEFAULT: Self = Self {
14442        latitude: 0_i32,
14443        longitude: 0_i32,
14444        altitude: 0_i32,
14445        time_usec: 0_u64,
14446    };
14447    #[cfg(feature = "arbitrary")]
14448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14449        use arbitrary::{Arbitrary, Unstructured};
14450        let mut buf = [0u8; 1024];
14451        rng.fill_bytes(&mut buf);
14452        let mut unstructured = Unstructured::new(&buf);
14453        Self::arbitrary(&mut unstructured).unwrap_or_default()
14454    }
14455}
14456impl Default for GPS_GLOBAL_ORIGIN_DATA {
14457    fn default() -> Self {
14458        Self::DEFAULT.clone()
14459    }
14460}
14461impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14462    type Message = MavMessage;
14463    const ID: u32 = 49u32;
14464    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14465    const EXTRA_CRC: u8 = 39u8;
14466    const ENCODED_LEN: usize = 20usize;
14467    fn deser(
14468        _version: MavlinkVersion,
14469        __input: &[u8],
14470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14471        let avail_len = __input.len();
14472        let mut payload_buf = [0; Self::ENCODED_LEN];
14473        let mut buf = if avail_len < Self::ENCODED_LEN {
14474            payload_buf[0..avail_len].copy_from_slice(__input);
14475            Bytes::new(&payload_buf)
14476        } else {
14477            Bytes::new(__input)
14478        };
14479        let mut __struct = Self::default();
14480        __struct.latitude = buf.get_i32_le();
14481        __struct.longitude = buf.get_i32_le();
14482        __struct.altitude = buf.get_i32_le();
14483        __struct.time_usec = buf.get_u64_le();
14484        Ok(__struct)
14485    }
14486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14487        let mut __tmp = BytesMut::new(bytes);
14488        #[allow(clippy::absurd_extreme_comparisons)]
14489        #[allow(unused_comparisons)]
14490        if __tmp.remaining() < Self::ENCODED_LEN {
14491            panic!(
14492                "buffer is too small (need {} bytes, but got {})",
14493                Self::ENCODED_LEN,
14494                __tmp.remaining(),
14495            )
14496        }
14497        __tmp.put_i32_le(self.latitude);
14498        __tmp.put_i32_le(self.longitude);
14499        __tmp.put_i32_le(self.altitude);
14500        if matches!(version, MavlinkVersion::V2) {
14501            __tmp.put_u64_le(self.time_usec);
14502            let len = __tmp.len();
14503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14504        } else {
14505            __tmp.len()
14506        }
14507    }
14508}
14509#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14510#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14511#[doc = ""]
14512#[doc = "ID: 123"]
14513#[derive(Debug, Clone, PartialEq)]
14514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14516#[cfg_attr(feature = "ts", derive(TS))]
14517#[cfg_attr(feature = "ts", ts(export))]
14518pub struct GPS_INJECT_DATA_DATA {
14519    #[doc = "System ID"]
14520    pub target_system: u8,
14521    #[doc = "Component ID"]
14522    pub target_component: u8,
14523    #[doc = "Data length"]
14524    pub len: u8,
14525    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14527    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14528    pub data: [u8; 110],
14529}
14530impl GPS_INJECT_DATA_DATA {
14531    pub const ENCODED_LEN: usize = 113usize;
14532    pub const DEFAULT: Self = Self {
14533        target_system: 0_u8,
14534        target_component: 0_u8,
14535        len: 0_u8,
14536        data: [0_u8; 110usize],
14537    };
14538    #[cfg(feature = "arbitrary")]
14539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14540        use arbitrary::{Arbitrary, Unstructured};
14541        let mut buf = [0u8; 1024];
14542        rng.fill_bytes(&mut buf);
14543        let mut unstructured = Unstructured::new(&buf);
14544        Self::arbitrary(&mut unstructured).unwrap_or_default()
14545    }
14546}
14547impl Default for GPS_INJECT_DATA_DATA {
14548    fn default() -> Self {
14549        Self::DEFAULT.clone()
14550    }
14551}
14552impl MessageData for GPS_INJECT_DATA_DATA {
14553    type Message = MavMessage;
14554    const ID: u32 = 123u32;
14555    const NAME: &'static str = "GPS_INJECT_DATA";
14556    const EXTRA_CRC: u8 = 250u8;
14557    const ENCODED_LEN: usize = 113usize;
14558    fn deser(
14559        _version: MavlinkVersion,
14560        __input: &[u8],
14561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14562        let avail_len = __input.len();
14563        let mut payload_buf = [0; Self::ENCODED_LEN];
14564        let mut buf = if avail_len < Self::ENCODED_LEN {
14565            payload_buf[0..avail_len].copy_from_slice(__input);
14566            Bytes::new(&payload_buf)
14567        } else {
14568            Bytes::new(__input)
14569        };
14570        let mut __struct = Self::default();
14571        __struct.target_system = buf.get_u8();
14572        __struct.target_component = buf.get_u8();
14573        __struct.len = buf.get_u8();
14574        for v in &mut __struct.data {
14575            let val = buf.get_u8();
14576            *v = val;
14577        }
14578        Ok(__struct)
14579    }
14580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14581        let mut __tmp = BytesMut::new(bytes);
14582        #[allow(clippy::absurd_extreme_comparisons)]
14583        #[allow(unused_comparisons)]
14584        if __tmp.remaining() < Self::ENCODED_LEN {
14585            panic!(
14586                "buffer is too small (need {} bytes, but got {})",
14587                Self::ENCODED_LEN,
14588                __tmp.remaining(),
14589            )
14590        }
14591        __tmp.put_u8(self.target_system);
14592        __tmp.put_u8(self.target_component);
14593        __tmp.put_u8(self.len);
14594        for val in &self.data {
14595            __tmp.put_u8(*val);
14596        }
14597        if matches!(version, MavlinkVersion::V2) {
14598            let len = __tmp.len();
14599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14600        } else {
14601            __tmp.len()
14602        }
14603    }
14604}
14605#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14606#[doc = ""]
14607#[doc = "ID: 232"]
14608#[derive(Debug, Clone, PartialEq)]
14609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14611#[cfg_attr(feature = "ts", derive(TS))]
14612#[cfg_attr(feature = "ts", ts(export))]
14613pub struct GPS_INPUT_DATA {
14614    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14615    pub time_usec: u64,
14616    #[doc = "GPS time (from start of GPS week)"]
14617    pub time_week_ms: u32,
14618    #[doc = "Latitude (WGS84)"]
14619    pub lat: i32,
14620    #[doc = "Longitude (WGS84)"]
14621    pub lon: i32,
14622    #[doc = "Altitude (MSL). Positive for up."]
14623    pub alt: f32,
14624    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14625    pub hdop: f32,
14626    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14627    pub vdop: f32,
14628    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14629    pub vn: f32,
14630    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14631    pub ve: f32,
14632    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14633    pub vd: f32,
14634    #[doc = "GPS speed accuracy"]
14635    pub speed_accuracy: f32,
14636    #[doc = "GPS horizontal accuracy"]
14637    pub horiz_accuracy: f32,
14638    #[doc = "GPS vertical accuracy"]
14639    pub vert_accuracy: f32,
14640    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14641    pub ignore_flags: GpsInputIgnoreFlags,
14642    #[doc = "GPS week number"]
14643    pub time_week: u16,
14644    #[doc = "ID of the GPS for multiple GPS inputs"]
14645    pub gps_id: u8,
14646    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14647    pub fix_type: u8,
14648    #[doc = "Number of satellites visible."]
14649    pub satellites_visible: u8,
14650    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14652    pub yaw: u16,
14653}
14654impl GPS_INPUT_DATA {
14655    pub const ENCODED_LEN: usize = 65usize;
14656    pub const DEFAULT: Self = Self {
14657        time_usec: 0_u64,
14658        time_week_ms: 0_u32,
14659        lat: 0_i32,
14660        lon: 0_i32,
14661        alt: 0.0_f32,
14662        hdop: 0.0_f32,
14663        vdop: 0.0_f32,
14664        vn: 0.0_f32,
14665        ve: 0.0_f32,
14666        vd: 0.0_f32,
14667        speed_accuracy: 0.0_f32,
14668        horiz_accuracy: 0.0_f32,
14669        vert_accuracy: 0.0_f32,
14670        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14671        time_week: 0_u16,
14672        gps_id: 0_u8,
14673        fix_type: 0_u8,
14674        satellites_visible: 0_u8,
14675        yaw: 0_u16,
14676    };
14677    #[cfg(feature = "arbitrary")]
14678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14679        use arbitrary::{Arbitrary, Unstructured};
14680        let mut buf = [0u8; 1024];
14681        rng.fill_bytes(&mut buf);
14682        let mut unstructured = Unstructured::new(&buf);
14683        Self::arbitrary(&mut unstructured).unwrap_or_default()
14684    }
14685}
14686impl Default for GPS_INPUT_DATA {
14687    fn default() -> Self {
14688        Self::DEFAULT.clone()
14689    }
14690}
14691impl MessageData for GPS_INPUT_DATA {
14692    type Message = MavMessage;
14693    const ID: u32 = 232u32;
14694    const NAME: &'static str = "GPS_INPUT";
14695    const EXTRA_CRC: u8 = 151u8;
14696    const ENCODED_LEN: usize = 65usize;
14697    fn deser(
14698        _version: MavlinkVersion,
14699        __input: &[u8],
14700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14701        let avail_len = __input.len();
14702        let mut payload_buf = [0; Self::ENCODED_LEN];
14703        let mut buf = if avail_len < Self::ENCODED_LEN {
14704            payload_buf[0..avail_len].copy_from_slice(__input);
14705            Bytes::new(&payload_buf)
14706        } else {
14707            Bytes::new(__input)
14708        };
14709        let mut __struct = Self::default();
14710        __struct.time_usec = buf.get_u64_le();
14711        __struct.time_week_ms = buf.get_u32_le();
14712        __struct.lat = buf.get_i32_le();
14713        __struct.lon = buf.get_i32_le();
14714        __struct.alt = buf.get_f32_le();
14715        __struct.hdop = buf.get_f32_le();
14716        __struct.vdop = buf.get_f32_le();
14717        __struct.vn = buf.get_f32_le();
14718        __struct.ve = buf.get_f32_le();
14719        __struct.vd = buf.get_f32_le();
14720        __struct.speed_accuracy = buf.get_f32_le();
14721        __struct.horiz_accuracy = buf.get_f32_le();
14722        __struct.vert_accuracy = buf.get_f32_le();
14723        let tmp = buf.get_u16_le();
14724        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14725            tmp & GpsInputIgnoreFlags::all().bits(),
14726        )
14727        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14728            flag_type: "GpsInputIgnoreFlags",
14729            value: tmp as u32,
14730        })?;
14731        __struct.time_week = buf.get_u16_le();
14732        __struct.gps_id = buf.get_u8();
14733        __struct.fix_type = buf.get_u8();
14734        __struct.satellites_visible = buf.get_u8();
14735        __struct.yaw = buf.get_u16_le();
14736        Ok(__struct)
14737    }
14738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14739        let mut __tmp = BytesMut::new(bytes);
14740        #[allow(clippy::absurd_extreme_comparisons)]
14741        #[allow(unused_comparisons)]
14742        if __tmp.remaining() < Self::ENCODED_LEN {
14743            panic!(
14744                "buffer is too small (need {} bytes, but got {})",
14745                Self::ENCODED_LEN,
14746                __tmp.remaining(),
14747            )
14748        }
14749        __tmp.put_u64_le(self.time_usec);
14750        __tmp.put_u32_le(self.time_week_ms);
14751        __tmp.put_i32_le(self.lat);
14752        __tmp.put_i32_le(self.lon);
14753        __tmp.put_f32_le(self.alt);
14754        __tmp.put_f32_le(self.hdop);
14755        __tmp.put_f32_le(self.vdop);
14756        __tmp.put_f32_le(self.vn);
14757        __tmp.put_f32_le(self.ve);
14758        __tmp.put_f32_le(self.vd);
14759        __tmp.put_f32_le(self.speed_accuracy);
14760        __tmp.put_f32_le(self.horiz_accuracy);
14761        __tmp.put_f32_le(self.vert_accuracy);
14762        __tmp.put_u16_le(self.ignore_flags.bits());
14763        __tmp.put_u16_le(self.time_week);
14764        __tmp.put_u8(self.gps_id);
14765        __tmp.put_u8(self.fix_type);
14766        __tmp.put_u8(self.satellites_visible);
14767        if matches!(version, MavlinkVersion::V2) {
14768            __tmp.put_u16_le(self.yaw);
14769            let len = __tmp.len();
14770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14771        } else {
14772            __tmp.len()
14773        }
14774    }
14775}
14776#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14777#[doc = ""]
14778#[doc = "ID: 24"]
14779#[derive(Debug, Clone, PartialEq)]
14780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14782#[cfg_attr(feature = "ts", derive(TS))]
14783#[cfg_attr(feature = "ts", ts(export))]
14784pub struct GPS_RAW_INT_DATA {
14785    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14786    pub time_usec: u64,
14787    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14788    pub lat: i32,
14789    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14790    pub lon: i32,
14791    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14792    pub alt: i32,
14793    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14794    pub eph: u16,
14795    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14796    pub epv: u16,
14797    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14798    pub vel: u16,
14799    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14800    pub cog: u16,
14801    #[doc = "GPS fix type."]
14802    pub fix_type: GpsFixType,
14803    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14804    pub satellites_visible: u8,
14805    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14807    pub alt_ellipsoid: i32,
14808    #[doc = "Position uncertainty."]
14809    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14810    pub h_acc: u32,
14811    #[doc = "Altitude uncertainty."]
14812    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14813    pub v_acc: u32,
14814    #[doc = "Speed uncertainty."]
14815    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14816    pub vel_acc: u32,
14817    #[doc = "Heading / track uncertainty"]
14818    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14819    pub hdg_acc: u32,
14820    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14822    pub yaw: u16,
14823}
14824impl GPS_RAW_INT_DATA {
14825    pub const ENCODED_LEN: usize = 52usize;
14826    pub const DEFAULT: Self = Self {
14827        time_usec: 0_u64,
14828        lat: 0_i32,
14829        lon: 0_i32,
14830        alt: 0_i32,
14831        eph: 0_u16,
14832        epv: 0_u16,
14833        vel: 0_u16,
14834        cog: 0_u16,
14835        fix_type: GpsFixType::DEFAULT,
14836        satellites_visible: 0_u8,
14837        alt_ellipsoid: 0_i32,
14838        h_acc: 0_u32,
14839        v_acc: 0_u32,
14840        vel_acc: 0_u32,
14841        hdg_acc: 0_u32,
14842        yaw: 0_u16,
14843    };
14844    #[cfg(feature = "arbitrary")]
14845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14846        use arbitrary::{Arbitrary, Unstructured};
14847        let mut buf = [0u8; 1024];
14848        rng.fill_bytes(&mut buf);
14849        let mut unstructured = Unstructured::new(&buf);
14850        Self::arbitrary(&mut unstructured).unwrap_or_default()
14851    }
14852}
14853impl Default for GPS_RAW_INT_DATA {
14854    fn default() -> Self {
14855        Self::DEFAULT.clone()
14856    }
14857}
14858impl MessageData for GPS_RAW_INT_DATA {
14859    type Message = MavMessage;
14860    const ID: u32 = 24u32;
14861    const NAME: &'static str = "GPS_RAW_INT";
14862    const EXTRA_CRC: u8 = 24u8;
14863    const ENCODED_LEN: usize = 52usize;
14864    fn deser(
14865        _version: MavlinkVersion,
14866        __input: &[u8],
14867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14868        let avail_len = __input.len();
14869        let mut payload_buf = [0; Self::ENCODED_LEN];
14870        let mut buf = if avail_len < Self::ENCODED_LEN {
14871            payload_buf[0..avail_len].copy_from_slice(__input);
14872            Bytes::new(&payload_buf)
14873        } else {
14874            Bytes::new(__input)
14875        };
14876        let mut __struct = Self::default();
14877        __struct.time_usec = buf.get_u64_le();
14878        __struct.lat = buf.get_i32_le();
14879        __struct.lon = buf.get_i32_le();
14880        __struct.alt = buf.get_i32_le();
14881        __struct.eph = buf.get_u16_le();
14882        __struct.epv = buf.get_u16_le();
14883        __struct.vel = buf.get_u16_le();
14884        __struct.cog = buf.get_u16_le();
14885        let tmp = buf.get_u8();
14886        __struct.fix_type =
14887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14888                enum_type: "GpsFixType",
14889                value: tmp as u32,
14890            })?;
14891        __struct.satellites_visible = buf.get_u8();
14892        __struct.alt_ellipsoid = buf.get_i32_le();
14893        __struct.h_acc = buf.get_u32_le();
14894        __struct.v_acc = buf.get_u32_le();
14895        __struct.vel_acc = buf.get_u32_le();
14896        __struct.hdg_acc = buf.get_u32_le();
14897        __struct.yaw = buf.get_u16_le();
14898        Ok(__struct)
14899    }
14900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14901        let mut __tmp = BytesMut::new(bytes);
14902        #[allow(clippy::absurd_extreme_comparisons)]
14903        #[allow(unused_comparisons)]
14904        if __tmp.remaining() < Self::ENCODED_LEN {
14905            panic!(
14906                "buffer is too small (need {} bytes, but got {})",
14907                Self::ENCODED_LEN,
14908                __tmp.remaining(),
14909            )
14910        }
14911        __tmp.put_u64_le(self.time_usec);
14912        __tmp.put_i32_le(self.lat);
14913        __tmp.put_i32_le(self.lon);
14914        __tmp.put_i32_le(self.alt);
14915        __tmp.put_u16_le(self.eph);
14916        __tmp.put_u16_le(self.epv);
14917        __tmp.put_u16_le(self.vel);
14918        __tmp.put_u16_le(self.cog);
14919        __tmp.put_u8(self.fix_type as u8);
14920        __tmp.put_u8(self.satellites_visible);
14921        if matches!(version, MavlinkVersion::V2) {
14922            __tmp.put_i32_le(self.alt_ellipsoid);
14923            __tmp.put_u32_le(self.h_acc);
14924            __tmp.put_u32_le(self.v_acc);
14925            __tmp.put_u32_le(self.vel_acc);
14926            __tmp.put_u32_le(self.hdg_acc);
14927            __tmp.put_u16_le(self.yaw);
14928            let len = __tmp.len();
14929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14930        } else {
14931            __tmp.len()
14932        }
14933    }
14934}
14935#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14936#[doc = ""]
14937#[doc = "ID: 233"]
14938#[derive(Debug, Clone, PartialEq)]
14939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14941#[cfg_attr(feature = "ts", derive(TS))]
14942#[cfg_attr(feature = "ts", ts(export))]
14943pub struct GPS_RTCM_DATA_DATA {
14944    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14945    pub flags: u8,
14946    #[doc = "data length"]
14947    pub len: u8,
14948    #[doc = "RTCM message (may be fragmented)"]
14949    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14950    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14951    pub data: [u8; 180],
14952}
14953impl GPS_RTCM_DATA_DATA {
14954    pub const ENCODED_LEN: usize = 182usize;
14955    pub const DEFAULT: Self = Self {
14956        flags: 0_u8,
14957        len: 0_u8,
14958        data: [0_u8; 180usize],
14959    };
14960    #[cfg(feature = "arbitrary")]
14961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14962        use arbitrary::{Arbitrary, Unstructured};
14963        let mut buf = [0u8; 1024];
14964        rng.fill_bytes(&mut buf);
14965        let mut unstructured = Unstructured::new(&buf);
14966        Self::arbitrary(&mut unstructured).unwrap_or_default()
14967    }
14968}
14969impl Default for GPS_RTCM_DATA_DATA {
14970    fn default() -> Self {
14971        Self::DEFAULT.clone()
14972    }
14973}
14974impl MessageData for GPS_RTCM_DATA_DATA {
14975    type Message = MavMessage;
14976    const ID: u32 = 233u32;
14977    const NAME: &'static str = "GPS_RTCM_DATA";
14978    const EXTRA_CRC: u8 = 35u8;
14979    const ENCODED_LEN: usize = 182usize;
14980    fn deser(
14981        _version: MavlinkVersion,
14982        __input: &[u8],
14983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14984        let avail_len = __input.len();
14985        let mut payload_buf = [0; Self::ENCODED_LEN];
14986        let mut buf = if avail_len < Self::ENCODED_LEN {
14987            payload_buf[0..avail_len].copy_from_slice(__input);
14988            Bytes::new(&payload_buf)
14989        } else {
14990            Bytes::new(__input)
14991        };
14992        let mut __struct = Self::default();
14993        __struct.flags = buf.get_u8();
14994        __struct.len = buf.get_u8();
14995        for v in &mut __struct.data {
14996            let val = buf.get_u8();
14997            *v = val;
14998        }
14999        Ok(__struct)
15000    }
15001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15002        let mut __tmp = BytesMut::new(bytes);
15003        #[allow(clippy::absurd_extreme_comparisons)]
15004        #[allow(unused_comparisons)]
15005        if __tmp.remaining() < Self::ENCODED_LEN {
15006            panic!(
15007                "buffer is too small (need {} bytes, but got {})",
15008                Self::ENCODED_LEN,
15009                __tmp.remaining(),
15010            )
15011        }
15012        __tmp.put_u8(self.flags);
15013        __tmp.put_u8(self.len);
15014        for val in &self.data {
15015            __tmp.put_u8(*val);
15016        }
15017        if matches!(version, MavlinkVersion::V2) {
15018            let len = __tmp.len();
15019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15020        } else {
15021            __tmp.len()
15022        }
15023    }
15024}
15025#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15026#[doc = ""]
15027#[doc = "ID: 127"]
15028#[derive(Debug, Clone, PartialEq)]
15029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15031#[cfg_attr(feature = "ts", derive(TS))]
15032#[cfg_attr(feature = "ts", ts(export))]
15033pub struct GPS_RTK_DATA {
15034    #[doc = "Time since boot of last baseline message received."]
15035    pub time_last_baseline_ms: u32,
15036    #[doc = "GPS Time of Week of last baseline"]
15037    pub tow: u32,
15038    #[doc = "Current baseline in ECEF x or NED north component."]
15039    pub baseline_a_mm: i32,
15040    #[doc = "Current baseline in ECEF y or NED east component."]
15041    pub baseline_b_mm: i32,
15042    #[doc = "Current baseline in ECEF z or NED down component."]
15043    pub baseline_c_mm: i32,
15044    #[doc = "Current estimate of baseline accuracy."]
15045    pub accuracy: u32,
15046    #[doc = "Current number of integer ambiguity hypotheses."]
15047    pub iar_num_hypotheses: i32,
15048    #[doc = "GPS Week Number of last baseline"]
15049    pub wn: u16,
15050    #[doc = "Identification of connected RTK receiver."]
15051    pub rtk_receiver_id: u8,
15052    #[doc = "GPS-specific health report for RTK data."]
15053    pub rtk_health: u8,
15054    #[doc = "Rate of baseline messages being received by GPS"]
15055    pub rtk_rate: u8,
15056    #[doc = "Current number of sats used for RTK calculation."]
15057    pub nsats: u8,
15058    #[doc = "Coordinate system of baseline"]
15059    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15060}
15061impl GPS_RTK_DATA {
15062    pub const ENCODED_LEN: usize = 35usize;
15063    pub const DEFAULT: Self = Self {
15064        time_last_baseline_ms: 0_u32,
15065        tow: 0_u32,
15066        baseline_a_mm: 0_i32,
15067        baseline_b_mm: 0_i32,
15068        baseline_c_mm: 0_i32,
15069        accuracy: 0_u32,
15070        iar_num_hypotheses: 0_i32,
15071        wn: 0_u16,
15072        rtk_receiver_id: 0_u8,
15073        rtk_health: 0_u8,
15074        rtk_rate: 0_u8,
15075        nsats: 0_u8,
15076        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15077    };
15078    #[cfg(feature = "arbitrary")]
15079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15080        use arbitrary::{Arbitrary, Unstructured};
15081        let mut buf = [0u8; 1024];
15082        rng.fill_bytes(&mut buf);
15083        let mut unstructured = Unstructured::new(&buf);
15084        Self::arbitrary(&mut unstructured).unwrap_or_default()
15085    }
15086}
15087impl Default for GPS_RTK_DATA {
15088    fn default() -> Self {
15089        Self::DEFAULT.clone()
15090    }
15091}
15092impl MessageData for GPS_RTK_DATA {
15093    type Message = MavMessage;
15094    const ID: u32 = 127u32;
15095    const NAME: &'static str = "GPS_RTK";
15096    const EXTRA_CRC: u8 = 25u8;
15097    const ENCODED_LEN: usize = 35usize;
15098    fn deser(
15099        _version: MavlinkVersion,
15100        __input: &[u8],
15101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15102        let avail_len = __input.len();
15103        let mut payload_buf = [0; Self::ENCODED_LEN];
15104        let mut buf = if avail_len < Self::ENCODED_LEN {
15105            payload_buf[0..avail_len].copy_from_slice(__input);
15106            Bytes::new(&payload_buf)
15107        } else {
15108            Bytes::new(__input)
15109        };
15110        let mut __struct = Self::default();
15111        __struct.time_last_baseline_ms = buf.get_u32_le();
15112        __struct.tow = buf.get_u32_le();
15113        __struct.baseline_a_mm = buf.get_i32_le();
15114        __struct.baseline_b_mm = buf.get_i32_le();
15115        __struct.baseline_c_mm = buf.get_i32_le();
15116        __struct.accuracy = buf.get_u32_le();
15117        __struct.iar_num_hypotheses = buf.get_i32_le();
15118        __struct.wn = buf.get_u16_le();
15119        __struct.rtk_receiver_id = buf.get_u8();
15120        __struct.rtk_health = buf.get_u8();
15121        __struct.rtk_rate = buf.get_u8();
15122        __struct.nsats = buf.get_u8();
15123        let tmp = buf.get_u8();
15124        __struct.baseline_coords_type =
15125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15126                enum_type: "RtkBaselineCoordinateSystem",
15127                value: tmp as u32,
15128            })?;
15129        Ok(__struct)
15130    }
15131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15132        let mut __tmp = BytesMut::new(bytes);
15133        #[allow(clippy::absurd_extreme_comparisons)]
15134        #[allow(unused_comparisons)]
15135        if __tmp.remaining() < Self::ENCODED_LEN {
15136            panic!(
15137                "buffer is too small (need {} bytes, but got {})",
15138                Self::ENCODED_LEN,
15139                __tmp.remaining(),
15140            )
15141        }
15142        __tmp.put_u32_le(self.time_last_baseline_ms);
15143        __tmp.put_u32_le(self.tow);
15144        __tmp.put_i32_le(self.baseline_a_mm);
15145        __tmp.put_i32_le(self.baseline_b_mm);
15146        __tmp.put_i32_le(self.baseline_c_mm);
15147        __tmp.put_u32_le(self.accuracy);
15148        __tmp.put_i32_le(self.iar_num_hypotheses);
15149        __tmp.put_u16_le(self.wn);
15150        __tmp.put_u8(self.rtk_receiver_id);
15151        __tmp.put_u8(self.rtk_health);
15152        __tmp.put_u8(self.rtk_rate);
15153        __tmp.put_u8(self.nsats);
15154        __tmp.put_u8(self.baseline_coords_type as u8);
15155        if matches!(version, MavlinkVersion::V2) {
15156            let len = __tmp.len();
15157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15158        } else {
15159            __tmp.len()
15160        }
15161    }
15162}
15163#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15164#[doc = ""]
15165#[doc = "ID: 25"]
15166#[derive(Debug, Clone, PartialEq)]
15167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15169#[cfg_attr(feature = "ts", derive(TS))]
15170#[cfg_attr(feature = "ts", ts(export))]
15171pub struct GPS_STATUS_DATA {
15172    #[doc = "Number of satellites visible"]
15173    pub satellites_visible: u8,
15174    #[doc = "Global satellite ID"]
15175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15176    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15177    pub satellite_prn: [u8; 20],
15178    #[doc = "0: Satellite not used, 1: used for localization"]
15179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15180    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15181    pub satellite_used: [u8; 20],
15182    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15183    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15184    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15185    pub satellite_elevation: [u8; 20],
15186    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15189    pub satellite_azimuth: [u8; 20],
15190    #[doc = "Signal to noise ratio of satellite"]
15191    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15192    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15193    pub satellite_snr: [u8; 20],
15194}
15195impl GPS_STATUS_DATA {
15196    pub const ENCODED_LEN: usize = 101usize;
15197    pub const DEFAULT: Self = Self {
15198        satellites_visible: 0_u8,
15199        satellite_prn: [0_u8; 20usize],
15200        satellite_used: [0_u8; 20usize],
15201        satellite_elevation: [0_u8; 20usize],
15202        satellite_azimuth: [0_u8; 20usize],
15203        satellite_snr: [0_u8; 20usize],
15204    };
15205    #[cfg(feature = "arbitrary")]
15206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15207        use arbitrary::{Arbitrary, Unstructured};
15208        let mut buf = [0u8; 1024];
15209        rng.fill_bytes(&mut buf);
15210        let mut unstructured = Unstructured::new(&buf);
15211        Self::arbitrary(&mut unstructured).unwrap_or_default()
15212    }
15213}
15214impl Default for GPS_STATUS_DATA {
15215    fn default() -> Self {
15216        Self::DEFAULT.clone()
15217    }
15218}
15219impl MessageData for GPS_STATUS_DATA {
15220    type Message = MavMessage;
15221    const ID: u32 = 25u32;
15222    const NAME: &'static str = "GPS_STATUS";
15223    const EXTRA_CRC: u8 = 23u8;
15224    const ENCODED_LEN: usize = 101usize;
15225    fn deser(
15226        _version: MavlinkVersion,
15227        __input: &[u8],
15228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15229        let avail_len = __input.len();
15230        let mut payload_buf = [0; Self::ENCODED_LEN];
15231        let mut buf = if avail_len < Self::ENCODED_LEN {
15232            payload_buf[0..avail_len].copy_from_slice(__input);
15233            Bytes::new(&payload_buf)
15234        } else {
15235            Bytes::new(__input)
15236        };
15237        let mut __struct = Self::default();
15238        __struct.satellites_visible = buf.get_u8();
15239        for v in &mut __struct.satellite_prn {
15240            let val = buf.get_u8();
15241            *v = val;
15242        }
15243        for v in &mut __struct.satellite_used {
15244            let val = buf.get_u8();
15245            *v = val;
15246        }
15247        for v in &mut __struct.satellite_elevation {
15248            let val = buf.get_u8();
15249            *v = val;
15250        }
15251        for v in &mut __struct.satellite_azimuth {
15252            let val = buf.get_u8();
15253            *v = val;
15254        }
15255        for v in &mut __struct.satellite_snr {
15256            let val = buf.get_u8();
15257            *v = val;
15258        }
15259        Ok(__struct)
15260    }
15261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15262        let mut __tmp = BytesMut::new(bytes);
15263        #[allow(clippy::absurd_extreme_comparisons)]
15264        #[allow(unused_comparisons)]
15265        if __tmp.remaining() < Self::ENCODED_LEN {
15266            panic!(
15267                "buffer is too small (need {} bytes, but got {})",
15268                Self::ENCODED_LEN,
15269                __tmp.remaining(),
15270            )
15271        }
15272        __tmp.put_u8(self.satellites_visible);
15273        for val in &self.satellite_prn {
15274            __tmp.put_u8(*val);
15275        }
15276        for val in &self.satellite_used {
15277            __tmp.put_u8(*val);
15278        }
15279        for val in &self.satellite_elevation {
15280            __tmp.put_u8(*val);
15281        }
15282        for val in &self.satellite_azimuth {
15283            __tmp.put_u8(*val);
15284        }
15285        for val in &self.satellite_snr {
15286            __tmp.put_u8(*val);
15287        }
15288        if matches!(version, MavlinkVersion::V2) {
15289            let len = __tmp.len();
15290            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15291        } else {
15292            __tmp.len()
15293        }
15294    }
15295}
15296#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15297#[doc = ""]
15298#[doc = "ID: 0"]
15299#[derive(Debug, Clone, PartialEq)]
15300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15302#[cfg_attr(feature = "ts", derive(TS))]
15303#[cfg_attr(feature = "ts", ts(export))]
15304pub struct HEARTBEAT_DATA {
15305    #[doc = "A bitfield for use for autopilot-specific flags"]
15306    pub custom_mode: u32,
15307    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15308    pub mavtype: MavType,
15309    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15310    pub autopilot: MavAutopilot,
15311    #[doc = "System mode bitmap."]
15312    pub base_mode: MavModeFlag,
15313    #[doc = "System status flag."]
15314    pub system_status: MavState,
15315    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15316    pub mavlink_version: u8,
15317}
15318impl HEARTBEAT_DATA {
15319    pub const ENCODED_LEN: usize = 9usize;
15320    pub const DEFAULT: Self = Self {
15321        custom_mode: 0_u32,
15322        mavtype: MavType::DEFAULT,
15323        autopilot: MavAutopilot::DEFAULT,
15324        base_mode: MavModeFlag::DEFAULT,
15325        system_status: MavState::DEFAULT,
15326        mavlink_version: MINOR_MAVLINK_VERSION,
15327    };
15328    #[cfg(feature = "arbitrary")]
15329    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15330        use arbitrary::{Arbitrary, Unstructured};
15331        let mut buf = [0u8; 1024];
15332        rng.fill_bytes(&mut buf);
15333        let mut unstructured = Unstructured::new(&buf);
15334        Self::arbitrary(&mut unstructured).unwrap_or_default()
15335    }
15336}
15337impl Default for HEARTBEAT_DATA {
15338    fn default() -> Self {
15339        Self::DEFAULT.clone()
15340    }
15341}
15342impl MessageData for HEARTBEAT_DATA {
15343    type Message = MavMessage;
15344    const ID: u32 = 0u32;
15345    const NAME: &'static str = "HEARTBEAT";
15346    const EXTRA_CRC: u8 = 50u8;
15347    const ENCODED_LEN: usize = 9usize;
15348    fn deser(
15349        _version: MavlinkVersion,
15350        __input: &[u8],
15351    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15352        let avail_len = __input.len();
15353        let mut payload_buf = [0; Self::ENCODED_LEN];
15354        let mut buf = if avail_len < Self::ENCODED_LEN {
15355            payload_buf[0..avail_len].copy_from_slice(__input);
15356            Bytes::new(&payload_buf)
15357        } else {
15358            Bytes::new(__input)
15359        };
15360        let mut __struct = Self::default();
15361        __struct.custom_mode = buf.get_u32_le();
15362        let tmp = buf.get_u8();
15363        __struct.mavtype =
15364            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15365                enum_type: "MavType",
15366                value: tmp as u32,
15367            })?;
15368        let tmp = buf.get_u8();
15369        __struct.autopilot =
15370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15371                enum_type: "MavAutopilot",
15372                value: tmp as u32,
15373            })?;
15374        let tmp = buf.get_u8();
15375        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15376            ::mavlink_core::error::ParserError::InvalidFlag {
15377                flag_type: "MavModeFlag",
15378                value: tmp as u32,
15379            },
15380        )?;
15381        let tmp = buf.get_u8();
15382        __struct.system_status =
15383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15384                enum_type: "MavState",
15385                value: tmp as u32,
15386            })?;
15387        __struct.mavlink_version = buf.get_u8();
15388        Ok(__struct)
15389    }
15390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15391        let mut __tmp = BytesMut::new(bytes);
15392        #[allow(clippy::absurd_extreme_comparisons)]
15393        #[allow(unused_comparisons)]
15394        if __tmp.remaining() < Self::ENCODED_LEN {
15395            panic!(
15396                "buffer is too small (need {} bytes, but got {})",
15397                Self::ENCODED_LEN,
15398                __tmp.remaining(),
15399            )
15400        }
15401        __tmp.put_u32_le(self.custom_mode);
15402        __tmp.put_u8(self.mavtype as u8);
15403        __tmp.put_u8(self.autopilot as u8);
15404        __tmp.put_u8(self.base_mode.bits());
15405        __tmp.put_u8(self.system_status as u8);
15406        __tmp.put_u8(self.mavlink_version);
15407        if matches!(version, MavlinkVersion::V2) {
15408            let len = __tmp.len();
15409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15410        } else {
15411            __tmp.len()
15412        }
15413    }
15414}
15415#[doc = "The IMU readings in SI units in NED body frame."]
15416#[doc = ""]
15417#[doc = "ID: 105"]
15418#[derive(Debug, Clone, PartialEq)]
15419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15421#[cfg_attr(feature = "ts", derive(TS))]
15422#[cfg_attr(feature = "ts", ts(export))]
15423pub struct HIGHRES_IMU_DATA {
15424    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15425    pub time_usec: u64,
15426    #[doc = "X acceleration"]
15427    pub xacc: f32,
15428    #[doc = "Y acceleration"]
15429    pub yacc: f32,
15430    #[doc = "Z acceleration"]
15431    pub zacc: f32,
15432    #[doc = "Angular speed around X axis"]
15433    pub xgyro: f32,
15434    #[doc = "Angular speed around Y axis"]
15435    pub ygyro: f32,
15436    #[doc = "Angular speed around Z axis"]
15437    pub zgyro: f32,
15438    #[doc = "X Magnetic field"]
15439    pub xmag: f32,
15440    #[doc = "Y Magnetic field"]
15441    pub ymag: f32,
15442    #[doc = "Z Magnetic field"]
15443    pub zmag: f32,
15444    #[doc = "Absolute pressure"]
15445    pub abs_pressure: f32,
15446    #[doc = "Differential pressure"]
15447    pub diff_pressure: f32,
15448    #[doc = "Altitude calculated from pressure"]
15449    pub pressure_alt: f32,
15450    #[doc = "Temperature"]
15451    pub temperature: f32,
15452    #[doc = "Bitmap for fields that have updated since last message"]
15453    pub fields_updated: HighresImuUpdatedFlags,
15454    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15455    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15456    pub id: u8,
15457}
15458impl HIGHRES_IMU_DATA {
15459    pub const ENCODED_LEN: usize = 63usize;
15460    pub const DEFAULT: Self = Self {
15461        time_usec: 0_u64,
15462        xacc: 0.0_f32,
15463        yacc: 0.0_f32,
15464        zacc: 0.0_f32,
15465        xgyro: 0.0_f32,
15466        ygyro: 0.0_f32,
15467        zgyro: 0.0_f32,
15468        xmag: 0.0_f32,
15469        ymag: 0.0_f32,
15470        zmag: 0.0_f32,
15471        abs_pressure: 0.0_f32,
15472        diff_pressure: 0.0_f32,
15473        pressure_alt: 0.0_f32,
15474        temperature: 0.0_f32,
15475        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15476        id: 0_u8,
15477    };
15478    #[cfg(feature = "arbitrary")]
15479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15480        use arbitrary::{Arbitrary, Unstructured};
15481        let mut buf = [0u8; 1024];
15482        rng.fill_bytes(&mut buf);
15483        let mut unstructured = Unstructured::new(&buf);
15484        Self::arbitrary(&mut unstructured).unwrap_or_default()
15485    }
15486}
15487impl Default for HIGHRES_IMU_DATA {
15488    fn default() -> Self {
15489        Self::DEFAULT.clone()
15490    }
15491}
15492impl MessageData for HIGHRES_IMU_DATA {
15493    type Message = MavMessage;
15494    const ID: u32 = 105u32;
15495    const NAME: &'static str = "HIGHRES_IMU";
15496    const EXTRA_CRC: u8 = 93u8;
15497    const ENCODED_LEN: usize = 63usize;
15498    fn deser(
15499        _version: MavlinkVersion,
15500        __input: &[u8],
15501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15502        let avail_len = __input.len();
15503        let mut payload_buf = [0; Self::ENCODED_LEN];
15504        let mut buf = if avail_len < Self::ENCODED_LEN {
15505            payload_buf[0..avail_len].copy_from_slice(__input);
15506            Bytes::new(&payload_buf)
15507        } else {
15508            Bytes::new(__input)
15509        };
15510        let mut __struct = Self::default();
15511        __struct.time_usec = buf.get_u64_le();
15512        __struct.xacc = buf.get_f32_le();
15513        __struct.yacc = buf.get_f32_le();
15514        __struct.zacc = buf.get_f32_le();
15515        __struct.xgyro = buf.get_f32_le();
15516        __struct.ygyro = buf.get_f32_le();
15517        __struct.zgyro = buf.get_f32_le();
15518        __struct.xmag = buf.get_f32_le();
15519        __struct.ymag = buf.get_f32_le();
15520        __struct.zmag = buf.get_f32_le();
15521        __struct.abs_pressure = buf.get_f32_le();
15522        __struct.diff_pressure = buf.get_f32_le();
15523        __struct.pressure_alt = buf.get_f32_le();
15524        __struct.temperature = buf.get_f32_le();
15525        let tmp = buf.get_u16_le();
15526        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15527            tmp & HighresImuUpdatedFlags::all().bits(),
15528        )
15529        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15530            flag_type: "HighresImuUpdatedFlags",
15531            value: tmp as u32,
15532        })?;
15533        __struct.id = buf.get_u8();
15534        Ok(__struct)
15535    }
15536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15537        let mut __tmp = BytesMut::new(bytes);
15538        #[allow(clippy::absurd_extreme_comparisons)]
15539        #[allow(unused_comparisons)]
15540        if __tmp.remaining() < Self::ENCODED_LEN {
15541            panic!(
15542                "buffer is too small (need {} bytes, but got {})",
15543                Self::ENCODED_LEN,
15544                __tmp.remaining(),
15545            )
15546        }
15547        __tmp.put_u64_le(self.time_usec);
15548        __tmp.put_f32_le(self.xacc);
15549        __tmp.put_f32_le(self.yacc);
15550        __tmp.put_f32_le(self.zacc);
15551        __tmp.put_f32_le(self.xgyro);
15552        __tmp.put_f32_le(self.ygyro);
15553        __tmp.put_f32_le(self.zgyro);
15554        __tmp.put_f32_le(self.xmag);
15555        __tmp.put_f32_le(self.ymag);
15556        __tmp.put_f32_le(self.zmag);
15557        __tmp.put_f32_le(self.abs_pressure);
15558        __tmp.put_f32_le(self.diff_pressure);
15559        __tmp.put_f32_le(self.pressure_alt);
15560        __tmp.put_f32_le(self.temperature);
15561        __tmp.put_u16_le(self.fields_updated.bits());
15562        if matches!(version, MavlinkVersion::V2) {
15563            __tmp.put_u8(self.id);
15564            let len = __tmp.len();
15565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15566        } else {
15567            __tmp.len()
15568        }
15569    }
15570}
15571#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15572#[doc = "Message appropriate for high latency connections like Iridium."]
15573#[doc = ""]
15574#[doc = "ID: 234"]
15575#[derive(Debug, Clone, PartialEq)]
15576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15578#[cfg_attr(feature = "ts", derive(TS))]
15579#[cfg_attr(feature = "ts", ts(export))]
15580pub struct HIGH_LATENCY_DATA {
15581    #[doc = "A bitfield for use for autopilot-specific flags."]
15582    pub custom_mode: u32,
15583    #[doc = "Latitude"]
15584    pub latitude: i32,
15585    #[doc = "Longitude"]
15586    pub longitude: i32,
15587    #[doc = "roll"]
15588    pub roll: i16,
15589    #[doc = "pitch"]
15590    pub pitch: i16,
15591    #[doc = "heading"]
15592    pub heading: u16,
15593    #[doc = "heading setpoint"]
15594    pub heading_sp: i16,
15595    #[doc = "Altitude above mean sea level"]
15596    pub altitude_amsl: i16,
15597    #[doc = "Altitude setpoint relative to the home position"]
15598    pub altitude_sp: i16,
15599    #[doc = "distance to target"]
15600    pub wp_distance: u16,
15601    #[doc = "Bitmap of enabled system modes."]
15602    pub base_mode: MavModeFlag,
15603    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15604    pub landed_state: MavLandedState,
15605    #[doc = "throttle (percentage)"]
15606    pub throttle: i8,
15607    #[doc = "airspeed"]
15608    pub airspeed: u8,
15609    #[doc = "airspeed setpoint"]
15610    pub airspeed_sp: u8,
15611    #[doc = "groundspeed"]
15612    pub groundspeed: u8,
15613    #[doc = "climb rate"]
15614    pub climb_rate: i8,
15615    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15616    pub gps_nsat: u8,
15617    #[doc = "GPS Fix type."]
15618    pub gps_fix_type: GpsFixType,
15619    #[doc = "Remaining battery (percentage)"]
15620    pub battery_remaining: u8,
15621    #[doc = "Autopilot temperature (degrees C)"]
15622    pub temperature: i8,
15623    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15624    pub temperature_air: i8,
15625    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15626    pub failsafe: u8,
15627    #[doc = "current waypoint number"]
15628    pub wp_num: u8,
15629}
15630impl HIGH_LATENCY_DATA {
15631    pub const ENCODED_LEN: usize = 40usize;
15632    pub const DEFAULT: Self = Self {
15633        custom_mode: 0_u32,
15634        latitude: 0_i32,
15635        longitude: 0_i32,
15636        roll: 0_i16,
15637        pitch: 0_i16,
15638        heading: 0_u16,
15639        heading_sp: 0_i16,
15640        altitude_amsl: 0_i16,
15641        altitude_sp: 0_i16,
15642        wp_distance: 0_u16,
15643        base_mode: MavModeFlag::DEFAULT,
15644        landed_state: MavLandedState::DEFAULT,
15645        throttle: 0_i8,
15646        airspeed: 0_u8,
15647        airspeed_sp: 0_u8,
15648        groundspeed: 0_u8,
15649        climb_rate: 0_i8,
15650        gps_nsat: 0_u8,
15651        gps_fix_type: GpsFixType::DEFAULT,
15652        battery_remaining: 0_u8,
15653        temperature: 0_i8,
15654        temperature_air: 0_i8,
15655        failsafe: 0_u8,
15656        wp_num: 0_u8,
15657    };
15658    #[cfg(feature = "arbitrary")]
15659    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15660        use arbitrary::{Arbitrary, Unstructured};
15661        let mut buf = [0u8; 1024];
15662        rng.fill_bytes(&mut buf);
15663        let mut unstructured = Unstructured::new(&buf);
15664        Self::arbitrary(&mut unstructured).unwrap_or_default()
15665    }
15666}
15667impl Default for HIGH_LATENCY_DATA {
15668    fn default() -> Self {
15669        Self::DEFAULT.clone()
15670    }
15671}
15672impl MessageData for HIGH_LATENCY_DATA {
15673    type Message = MavMessage;
15674    const ID: u32 = 234u32;
15675    const NAME: &'static str = "HIGH_LATENCY";
15676    const EXTRA_CRC: u8 = 150u8;
15677    const ENCODED_LEN: usize = 40usize;
15678    fn deser(
15679        _version: MavlinkVersion,
15680        __input: &[u8],
15681    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15682        let avail_len = __input.len();
15683        let mut payload_buf = [0; Self::ENCODED_LEN];
15684        let mut buf = if avail_len < Self::ENCODED_LEN {
15685            payload_buf[0..avail_len].copy_from_slice(__input);
15686            Bytes::new(&payload_buf)
15687        } else {
15688            Bytes::new(__input)
15689        };
15690        let mut __struct = Self::default();
15691        __struct.custom_mode = buf.get_u32_le();
15692        __struct.latitude = buf.get_i32_le();
15693        __struct.longitude = buf.get_i32_le();
15694        __struct.roll = buf.get_i16_le();
15695        __struct.pitch = buf.get_i16_le();
15696        __struct.heading = buf.get_u16_le();
15697        __struct.heading_sp = buf.get_i16_le();
15698        __struct.altitude_amsl = buf.get_i16_le();
15699        __struct.altitude_sp = buf.get_i16_le();
15700        __struct.wp_distance = buf.get_u16_le();
15701        let tmp = buf.get_u8();
15702        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15703            ::mavlink_core::error::ParserError::InvalidFlag {
15704                flag_type: "MavModeFlag",
15705                value: tmp as u32,
15706            },
15707        )?;
15708        let tmp = buf.get_u8();
15709        __struct.landed_state =
15710            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15711                enum_type: "MavLandedState",
15712                value: tmp as u32,
15713            })?;
15714        __struct.throttle = buf.get_i8();
15715        __struct.airspeed = buf.get_u8();
15716        __struct.airspeed_sp = buf.get_u8();
15717        __struct.groundspeed = buf.get_u8();
15718        __struct.climb_rate = buf.get_i8();
15719        __struct.gps_nsat = buf.get_u8();
15720        let tmp = buf.get_u8();
15721        __struct.gps_fix_type =
15722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15723                enum_type: "GpsFixType",
15724                value: tmp as u32,
15725            })?;
15726        __struct.battery_remaining = buf.get_u8();
15727        __struct.temperature = buf.get_i8();
15728        __struct.temperature_air = buf.get_i8();
15729        __struct.failsafe = buf.get_u8();
15730        __struct.wp_num = buf.get_u8();
15731        Ok(__struct)
15732    }
15733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15734        let mut __tmp = BytesMut::new(bytes);
15735        #[allow(clippy::absurd_extreme_comparisons)]
15736        #[allow(unused_comparisons)]
15737        if __tmp.remaining() < Self::ENCODED_LEN {
15738            panic!(
15739                "buffer is too small (need {} bytes, but got {})",
15740                Self::ENCODED_LEN,
15741                __tmp.remaining(),
15742            )
15743        }
15744        __tmp.put_u32_le(self.custom_mode);
15745        __tmp.put_i32_le(self.latitude);
15746        __tmp.put_i32_le(self.longitude);
15747        __tmp.put_i16_le(self.roll);
15748        __tmp.put_i16_le(self.pitch);
15749        __tmp.put_u16_le(self.heading);
15750        __tmp.put_i16_le(self.heading_sp);
15751        __tmp.put_i16_le(self.altitude_amsl);
15752        __tmp.put_i16_le(self.altitude_sp);
15753        __tmp.put_u16_le(self.wp_distance);
15754        __tmp.put_u8(self.base_mode.bits());
15755        __tmp.put_u8(self.landed_state as u8);
15756        __tmp.put_i8(self.throttle);
15757        __tmp.put_u8(self.airspeed);
15758        __tmp.put_u8(self.airspeed_sp);
15759        __tmp.put_u8(self.groundspeed);
15760        __tmp.put_i8(self.climb_rate);
15761        __tmp.put_u8(self.gps_nsat);
15762        __tmp.put_u8(self.gps_fix_type as u8);
15763        __tmp.put_u8(self.battery_remaining);
15764        __tmp.put_i8(self.temperature);
15765        __tmp.put_i8(self.temperature_air);
15766        __tmp.put_u8(self.failsafe);
15767        __tmp.put_u8(self.wp_num);
15768        if matches!(version, MavlinkVersion::V2) {
15769            let len = __tmp.len();
15770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15771        } else {
15772            __tmp.len()
15773        }
15774    }
15775}
15776#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15777#[doc = ""]
15778#[doc = "ID: 235"]
15779#[derive(Debug, Clone, PartialEq)]
15780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15782#[cfg_attr(feature = "ts", derive(TS))]
15783#[cfg_attr(feature = "ts", ts(export))]
15784pub struct HIGH_LATENCY2_DATA {
15785    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15786    pub timestamp: u32,
15787    #[doc = "Latitude"]
15788    pub latitude: i32,
15789    #[doc = "Longitude"]
15790    pub longitude: i32,
15791    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15792    pub custom_mode: u16,
15793    #[doc = "Altitude above mean sea level"]
15794    pub altitude: i16,
15795    #[doc = "Altitude setpoint"]
15796    pub target_altitude: i16,
15797    #[doc = "Distance to target waypoint or position"]
15798    pub target_distance: u16,
15799    #[doc = "Current waypoint number"]
15800    pub wp_num: u16,
15801    #[doc = "Bitmap of failure flags."]
15802    pub failure_flags: HlFailureFlag,
15803    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15804    pub mavtype: MavType,
15805    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15806    pub autopilot: MavAutopilot,
15807    #[doc = "Heading"]
15808    pub heading: u8,
15809    #[doc = "Heading setpoint"]
15810    pub target_heading: u8,
15811    #[doc = "Throttle"]
15812    pub throttle: u8,
15813    #[doc = "Airspeed"]
15814    pub airspeed: u8,
15815    #[doc = "Airspeed setpoint"]
15816    pub airspeed_sp: u8,
15817    #[doc = "Groundspeed"]
15818    pub groundspeed: u8,
15819    #[doc = "Windspeed"]
15820    pub windspeed: u8,
15821    #[doc = "Wind heading"]
15822    pub wind_heading: u8,
15823    #[doc = "Maximum error horizontal position since last message"]
15824    pub eph: u8,
15825    #[doc = "Maximum error vertical position since last message"]
15826    pub epv: u8,
15827    #[doc = "Air temperature"]
15828    pub temperature_air: i8,
15829    #[doc = "Maximum climb rate magnitude since last message"]
15830    pub climb_rate: i8,
15831    #[doc = "Battery level (-1 if field not provided)."]
15832    pub battery: i8,
15833    #[doc = "Field for custom payload."]
15834    pub custom0: i8,
15835    #[doc = "Field for custom payload."]
15836    pub custom1: i8,
15837    #[doc = "Field for custom payload."]
15838    pub custom2: i8,
15839}
15840impl HIGH_LATENCY2_DATA {
15841    pub const ENCODED_LEN: usize = 42usize;
15842    pub const DEFAULT: Self = Self {
15843        timestamp: 0_u32,
15844        latitude: 0_i32,
15845        longitude: 0_i32,
15846        custom_mode: 0_u16,
15847        altitude: 0_i16,
15848        target_altitude: 0_i16,
15849        target_distance: 0_u16,
15850        wp_num: 0_u16,
15851        failure_flags: HlFailureFlag::DEFAULT,
15852        mavtype: MavType::DEFAULT,
15853        autopilot: MavAutopilot::DEFAULT,
15854        heading: 0_u8,
15855        target_heading: 0_u8,
15856        throttle: 0_u8,
15857        airspeed: 0_u8,
15858        airspeed_sp: 0_u8,
15859        groundspeed: 0_u8,
15860        windspeed: 0_u8,
15861        wind_heading: 0_u8,
15862        eph: 0_u8,
15863        epv: 0_u8,
15864        temperature_air: 0_i8,
15865        climb_rate: 0_i8,
15866        battery: 0_i8,
15867        custom0: 0_i8,
15868        custom1: 0_i8,
15869        custom2: 0_i8,
15870    };
15871    #[cfg(feature = "arbitrary")]
15872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15873        use arbitrary::{Arbitrary, Unstructured};
15874        let mut buf = [0u8; 1024];
15875        rng.fill_bytes(&mut buf);
15876        let mut unstructured = Unstructured::new(&buf);
15877        Self::arbitrary(&mut unstructured).unwrap_or_default()
15878    }
15879}
15880impl Default for HIGH_LATENCY2_DATA {
15881    fn default() -> Self {
15882        Self::DEFAULT.clone()
15883    }
15884}
15885impl MessageData for HIGH_LATENCY2_DATA {
15886    type Message = MavMessage;
15887    const ID: u32 = 235u32;
15888    const NAME: &'static str = "HIGH_LATENCY2";
15889    const EXTRA_CRC: u8 = 179u8;
15890    const ENCODED_LEN: usize = 42usize;
15891    fn deser(
15892        _version: MavlinkVersion,
15893        __input: &[u8],
15894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15895        let avail_len = __input.len();
15896        let mut payload_buf = [0; Self::ENCODED_LEN];
15897        let mut buf = if avail_len < Self::ENCODED_LEN {
15898            payload_buf[0..avail_len].copy_from_slice(__input);
15899            Bytes::new(&payload_buf)
15900        } else {
15901            Bytes::new(__input)
15902        };
15903        let mut __struct = Self::default();
15904        __struct.timestamp = buf.get_u32_le();
15905        __struct.latitude = buf.get_i32_le();
15906        __struct.longitude = buf.get_i32_le();
15907        __struct.custom_mode = buf.get_u16_le();
15908        __struct.altitude = buf.get_i16_le();
15909        __struct.target_altitude = buf.get_i16_le();
15910        __struct.target_distance = buf.get_u16_le();
15911        __struct.wp_num = buf.get_u16_le();
15912        let tmp = buf.get_u16_le();
15913        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15914            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15915                flag_type: "HlFailureFlag",
15916                value: tmp as u32,
15917            })?;
15918        let tmp = buf.get_u8();
15919        __struct.mavtype =
15920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15921                enum_type: "MavType",
15922                value: tmp as u32,
15923            })?;
15924        let tmp = buf.get_u8();
15925        __struct.autopilot =
15926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15927                enum_type: "MavAutopilot",
15928                value: tmp as u32,
15929            })?;
15930        __struct.heading = buf.get_u8();
15931        __struct.target_heading = buf.get_u8();
15932        __struct.throttle = buf.get_u8();
15933        __struct.airspeed = buf.get_u8();
15934        __struct.airspeed_sp = buf.get_u8();
15935        __struct.groundspeed = buf.get_u8();
15936        __struct.windspeed = buf.get_u8();
15937        __struct.wind_heading = buf.get_u8();
15938        __struct.eph = buf.get_u8();
15939        __struct.epv = buf.get_u8();
15940        __struct.temperature_air = buf.get_i8();
15941        __struct.climb_rate = buf.get_i8();
15942        __struct.battery = buf.get_i8();
15943        __struct.custom0 = buf.get_i8();
15944        __struct.custom1 = buf.get_i8();
15945        __struct.custom2 = buf.get_i8();
15946        Ok(__struct)
15947    }
15948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15949        let mut __tmp = BytesMut::new(bytes);
15950        #[allow(clippy::absurd_extreme_comparisons)]
15951        #[allow(unused_comparisons)]
15952        if __tmp.remaining() < Self::ENCODED_LEN {
15953            panic!(
15954                "buffer is too small (need {} bytes, but got {})",
15955                Self::ENCODED_LEN,
15956                __tmp.remaining(),
15957            )
15958        }
15959        __tmp.put_u32_le(self.timestamp);
15960        __tmp.put_i32_le(self.latitude);
15961        __tmp.put_i32_le(self.longitude);
15962        __tmp.put_u16_le(self.custom_mode);
15963        __tmp.put_i16_le(self.altitude);
15964        __tmp.put_i16_le(self.target_altitude);
15965        __tmp.put_u16_le(self.target_distance);
15966        __tmp.put_u16_le(self.wp_num);
15967        __tmp.put_u16_le(self.failure_flags.bits());
15968        __tmp.put_u8(self.mavtype as u8);
15969        __tmp.put_u8(self.autopilot as u8);
15970        __tmp.put_u8(self.heading);
15971        __tmp.put_u8(self.target_heading);
15972        __tmp.put_u8(self.throttle);
15973        __tmp.put_u8(self.airspeed);
15974        __tmp.put_u8(self.airspeed_sp);
15975        __tmp.put_u8(self.groundspeed);
15976        __tmp.put_u8(self.windspeed);
15977        __tmp.put_u8(self.wind_heading);
15978        __tmp.put_u8(self.eph);
15979        __tmp.put_u8(self.epv);
15980        __tmp.put_i8(self.temperature_air);
15981        __tmp.put_i8(self.climb_rate);
15982        __tmp.put_i8(self.battery);
15983        __tmp.put_i8(self.custom0);
15984        __tmp.put_i8(self.custom1);
15985        __tmp.put_i8(self.custom2);
15986        if matches!(version, MavlinkVersion::V2) {
15987            let len = __tmp.len();
15988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15989        } else {
15990            __tmp.len()
15991        }
15992    }
15993}
15994#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15995#[doc = ""]
15996#[doc = "ID: 93"]
15997#[derive(Debug, Clone, PartialEq)]
15998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16000#[cfg_attr(feature = "ts", derive(TS))]
16001#[cfg_attr(feature = "ts", ts(export))]
16002pub struct HIL_ACTUATOR_CONTROLS_DATA {
16003    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16004    pub time_usec: u64,
16005    #[doc = "Flags bitmask."]
16006    pub flags: HilActuatorControlsFlags,
16007    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16010    pub controls: [f32; 16],
16011    #[doc = "System mode. Includes arming state."]
16012    pub mode: MavModeFlag,
16013}
16014impl HIL_ACTUATOR_CONTROLS_DATA {
16015    pub const ENCODED_LEN: usize = 81usize;
16016    pub const DEFAULT: Self = Self {
16017        time_usec: 0_u64,
16018        flags: HilActuatorControlsFlags::DEFAULT,
16019        controls: [0.0_f32; 16usize],
16020        mode: MavModeFlag::DEFAULT,
16021    };
16022    #[cfg(feature = "arbitrary")]
16023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16024        use arbitrary::{Arbitrary, Unstructured};
16025        let mut buf = [0u8; 1024];
16026        rng.fill_bytes(&mut buf);
16027        let mut unstructured = Unstructured::new(&buf);
16028        Self::arbitrary(&mut unstructured).unwrap_or_default()
16029    }
16030}
16031impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16032    fn default() -> Self {
16033        Self::DEFAULT.clone()
16034    }
16035}
16036impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16037    type Message = MavMessage;
16038    const ID: u32 = 93u32;
16039    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16040    const EXTRA_CRC: u8 = 47u8;
16041    const ENCODED_LEN: usize = 81usize;
16042    fn deser(
16043        _version: MavlinkVersion,
16044        __input: &[u8],
16045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16046        let avail_len = __input.len();
16047        let mut payload_buf = [0; Self::ENCODED_LEN];
16048        let mut buf = if avail_len < Self::ENCODED_LEN {
16049            payload_buf[0..avail_len].copy_from_slice(__input);
16050            Bytes::new(&payload_buf)
16051        } else {
16052            Bytes::new(__input)
16053        };
16054        let mut __struct = Self::default();
16055        __struct.time_usec = buf.get_u64_le();
16056        let tmp = buf.get_u64_le();
16057        __struct.flags =
16058            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16059                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16060                    flag_type: "HilActuatorControlsFlags",
16061                    value: tmp as u32,
16062                })?;
16063        for v in &mut __struct.controls {
16064            let val = buf.get_f32_le();
16065            *v = val;
16066        }
16067        let tmp = buf.get_u8();
16068        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16069            ::mavlink_core::error::ParserError::InvalidFlag {
16070                flag_type: "MavModeFlag",
16071                value: tmp as u32,
16072            },
16073        )?;
16074        Ok(__struct)
16075    }
16076    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16077        let mut __tmp = BytesMut::new(bytes);
16078        #[allow(clippy::absurd_extreme_comparisons)]
16079        #[allow(unused_comparisons)]
16080        if __tmp.remaining() < Self::ENCODED_LEN {
16081            panic!(
16082                "buffer is too small (need {} bytes, but got {})",
16083                Self::ENCODED_LEN,
16084                __tmp.remaining(),
16085            )
16086        }
16087        __tmp.put_u64_le(self.time_usec);
16088        __tmp.put_u64_le(self.flags.bits());
16089        for val in &self.controls {
16090            __tmp.put_f32_le(*val);
16091        }
16092        __tmp.put_u8(self.mode.bits());
16093        if matches!(version, MavlinkVersion::V2) {
16094            let len = __tmp.len();
16095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16096        } else {
16097            __tmp.len()
16098        }
16099    }
16100}
16101#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16102#[doc = ""]
16103#[doc = "ID: 91"]
16104#[derive(Debug, Clone, PartialEq)]
16105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16107#[cfg_attr(feature = "ts", derive(TS))]
16108#[cfg_attr(feature = "ts", ts(export))]
16109pub struct HIL_CONTROLS_DATA {
16110    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16111    pub time_usec: u64,
16112    #[doc = "Control output -1 .. 1"]
16113    pub roll_ailerons: f32,
16114    #[doc = "Control output -1 .. 1"]
16115    pub pitch_elevator: f32,
16116    #[doc = "Control output -1 .. 1"]
16117    pub yaw_rudder: f32,
16118    #[doc = "Throttle 0 .. 1"]
16119    pub throttle: f32,
16120    #[doc = "Aux 1, -1 .. 1"]
16121    pub aux1: f32,
16122    #[doc = "Aux 2, -1 .. 1"]
16123    pub aux2: f32,
16124    #[doc = "Aux 3, -1 .. 1"]
16125    pub aux3: f32,
16126    #[doc = "Aux 4, -1 .. 1"]
16127    pub aux4: f32,
16128    #[doc = "System mode."]
16129    pub mode: MavMode,
16130    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16131    pub nav_mode: u8,
16132}
16133impl HIL_CONTROLS_DATA {
16134    pub const ENCODED_LEN: usize = 42usize;
16135    pub const DEFAULT: Self = Self {
16136        time_usec: 0_u64,
16137        roll_ailerons: 0.0_f32,
16138        pitch_elevator: 0.0_f32,
16139        yaw_rudder: 0.0_f32,
16140        throttle: 0.0_f32,
16141        aux1: 0.0_f32,
16142        aux2: 0.0_f32,
16143        aux3: 0.0_f32,
16144        aux4: 0.0_f32,
16145        mode: MavMode::DEFAULT,
16146        nav_mode: 0_u8,
16147    };
16148    #[cfg(feature = "arbitrary")]
16149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16150        use arbitrary::{Arbitrary, Unstructured};
16151        let mut buf = [0u8; 1024];
16152        rng.fill_bytes(&mut buf);
16153        let mut unstructured = Unstructured::new(&buf);
16154        Self::arbitrary(&mut unstructured).unwrap_or_default()
16155    }
16156}
16157impl Default for HIL_CONTROLS_DATA {
16158    fn default() -> Self {
16159        Self::DEFAULT.clone()
16160    }
16161}
16162impl MessageData for HIL_CONTROLS_DATA {
16163    type Message = MavMessage;
16164    const ID: u32 = 91u32;
16165    const NAME: &'static str = "HIL_CONTROLS";
16166    const EXTRA_CRC: u8 = 63u8;
16167    const ENCODED_LEN: usize = 42usize;
16168    fn deser(
16169        _version: MavlinkVersion,
16170        __input: &[u8],
16171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16172        let avail_len = __input.len();
16173        let mut payload_buf = [0; Self::ENCODED_LEN];
16174        let mut buf = if avail_len < Self::ENCODED_LEN {
16175            payload_buf[0..avail_len].copy_from_slice(__input);
16176            Bytes::new(&payload_buf)
16177        } else {
16178            Bytes::new(__input)
16179        };
16180        let mut __struct = Self::default();
16181        __struct.time_usec = buf.get_u64_le();
16182        __struct.roll_ailerons = buf.get_f32_le();
16183        __struct.pitch_elevator = buf.get_f32_le();
16184        __struct.yaw_rudder = buf.get_f32_le();
16185        __struct.throttle = buf.get_f32_le();
16186        __struct.aux1 = buf.get_f32_le();
16187        __struct.aux2 = buf.get_f32_le();
16188        __struct.aux3 = buf.get_f32_le();
16189        __struct.aux4 = buf.get_f32_le();
16190        let tmp = buf.get_u8();
16191        __struct.mode =
16192            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16193                enum_type: "MavMode",
16194                value: tmp as u32,
16195            })?;
16196        __struct.nav_mode = buf.get_u8();
16197        Ok(__struct)
16198    }
16199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16200        let mut __tmp = BytesMut::new(bytes);
16201        #[allow(clippy::absurd_extreme_comparisons)]
16202        #[allow(unused_comparisons)]
16203        if __tmp.remaining() < Self::ENCODED_LEN {
16204            panic!(
16205                "buffer is too small (need {} bytes, but got {})",
16206                Self::ENCODED_LEN,
16207                __tmp.remaining(),
16208            )
16209        }
16210        __tmp.put_u64_le(self.time_usec);
16211        __tmp.put_f32_le(self.roll_ailerons);
16212        __tmp.put_f32_le(self.pitch_elevator);
16213        __tmp.put_f32_le(self.yaw_rudder);
16214        __tmp.put_f32_le(self.throttle);
16215        __tmp.put_f32_le(self.aux1);
16216        __tmp.put_f32_le(self.aux2);
16217        __tmp.put_f32_le(self.aux3);
16218        __tmp.put_f32_le(self.aux4);
16219        __tmp.put_u8(self.mode as u8);
16220        __tmp.put_u8(self.nav_mode);
16221        if matches!(version, MavlinkVersion::V2) {
16222            let len = __tmp.len();
16223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16224        } else {
16225            __tmp.len()
16226        }
16227    }
16228}
16229#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16230#[doc = ""]
16231#[doc = "ID: 113"]
16232#[derive(Debug, Clone, PartialEq)]
16233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16235#[cfg_attr(feature = "ts", derive(TS))]
16236#[cfg_attr(feature = "ts", ts(export))]
16237pub struct HIL_GPS_DATA {
16238    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16239    pub time_usec: u64,
16240    #[doc = "Latitude (WGS84)"]
16241    pub lat: i32,
16242    #[doc = "Longitude (WGS84)"]
16243    pub lon: i32,
16244    #[doc = "Altitude (MSL). Positive for up."]
16245    pub alt: i32,
16246    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16247    pub eph: u16,
16248    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16249    pub epv: u16,
16250    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16251    pub vel: u16,
16252    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16253    pub vn: i16,
16254    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16255    pub ve: i16,
16256    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16257    pub vd: i16,
16258    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16259    pub cog: u16,
16260    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16261    pub fix_type: u8,
16262    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16263    pub satellites_visible: u8,
16264    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16266    pub id: u8,
16267    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16268    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16269    pub yaw: u16,
16270}
16271impl HIL_GPS_DATA {
16272    pub const ENCODED_LEN: usize = 39usize;
16273    pub const DEFAULT: Self = Self {
16274        time_usec: 0_u64,
16275        lat: 0_i32,
16276        lon: 0_i32,
16277        alt: 0_i32,
16278        eph: 0_u16,
16279        epv: 0_u16,
16280        vel: 0_u16,
16281        vn: 0_i16,
16282        ve: 0_i16,
16283        vd: 0_i16,
16284        cog: 0_u16,
16285        fix_type: 0_u8,
16286        satellites_visible: 0_u8,
16287        id: 0_u8,
16288        yaw: 0_u16,
16289    };
16290    #[cfg(feature = "arbitrary")]
16291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16292        use arbitrary::{Arbitrary, Unstructured};
16293        let mut buf = [0u8; 1024];
16294        rng.fill_bytes(&mut buf);
16295        let mut unstructured = Unstructured::new(&buf);
16296        Self::arbitrary(&mut unstructured).unwrap_or_default()
16297    }
16298}
16299impl Default for HIL_GPS_DATA {
16300    fn default() -> Self {
16301        Self::DEFAULT.clone()
16302    }
16303}
16304impl MessageData for HIL_GPS_DATA {
16305    type Message = MavMessage;
16306    const ID: u32 = 113u32;
16307    const NAME: &'static str = "HIL_GPS";
16308    const EXTRA_CRC: u8 = 124u8;
16309    const ENCODED_LEN: usize = 39usize;
16310    fn deser(
16311        _version: MavlinkVersion,
16312        __input: &[u8],
16313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16314        let avail_len = __input.len();
16315        let mut payload_buf = [0; Self::ENCODED_LEN];
16316        let mut buf = if avail_len < Self::ENCODED_LEN {
16317            payload_buf[0..avail_len].copy_from_slice(__input);
16318            Bytes::new(&payload_buf)
16319        } else {
16320            Bytes::new(__input)
16321        };
16322        let mut __struct = Self::default();
16323        __struct.time_usec = buf.get_u64_le();
16324        __struct.lat = buf.get_i32_le();
16325        __struct.lon = buf.get_i32_le();
16326        __struct.alt = buf.get_i32_le();
16327        __struct.eph = buf.get_u16_le();
16328        __struct.epv = buf.get_u16_le();
16329        __struct.vel = buf.get_u16_le();
16330        __struct.vn = buf.get_i16_le();
16331        __struct.ve = buf.get_i16_le();
16332        __struct.vd = buf.get_i16_le();
16333        __struct.cog = buf.get_u16_le();
16334        __struct.fix_type = buf.get_u8();
16335        __struct.satellites_visible = buf.get_u8();
16336        __struct.id = buf.get_u8();
16337        __struct.yaw = buf.get_u16_le();
16338        Ok(__struct)
16339    }
16340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16341        let mut __tmp = BytesMut::new(bytes);
16342        #[allow(clippy::absurd_extreme_comparisons)]
16343        #[allow(unused_comparisons)]
16344        if __tmp.remaining() < Self::ENCODED_LEN {
16345            panic!(
16346                "buffer is too small (need {} bytes, but got {})",
16347                Self::ENCODED_LEN,
16348                __tmp.remaining(),
16349            )
16350        }
16351        __tmp.put_u64_le(self.time_usec);
16352        __tmp.put_i32_le(self.lat);
16353        __tmp.put_i32_le(self.lon);
16354        __tmp.put_i32_le(self.alt);
16355        __tmp.put_u16_le(self.eph);
16356        __tmp.put_u16_le(self.epv);
16357        __tmp.put_u16_le(self.vel);
16358        __tmp.put_i16_le(self.vn);
16359        __tmp.put_i16_le(self.ve);
16360        __tmp.put_i16_le(self.vd);
16361        __tmp.put_u16_le(self.cog);
16362        __tmp.put_u8(self.fix_type);
16363        __tmp.put_u8(self.satellites_visible);
16364        if matches!(version, MavlinkVersion::V2) {
16365            __tmp.put_u8(self.id);
16366            __tmp.put_u16_le(self.yaw);
16367            let len = __tmp.len();
16368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16369        } else {
16370            __tmp.len()
16371        }
16372    }
16373}
16374#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16375#[doc = ""]
16376#[doc = "ID: 114"]
16377#[derive(Debug, Clone, PartialEq)]
16378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16380#[cfg_attr(feature = "ts", derive(TS))]
16381#[cfg_attr(feature = "ts", ts(export))]
16382pub struct HIL_OPTICAL_FLOW_DATA {
16383    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16384    pub time_usec: u64,
16385    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16386    pub integration_time_us: u32,
16387    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16388    pub integrated_x: f32,
16389    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16390    pub integrated_y: f32,
16391    #[doc = "RH rotation around X axis"]
16392    pub integrated_xgyro: f32,
16393    #[doc = "RH rotation around Y axis"]
16394    pub integrated_ygyro: f32,
16395    #[doc = "RH rotation around Z axis"]
16396    pub integrated_zgyro: f32,
16397    #[doc = "Time since the distance was sampled."]
16398    pub time_delta_distance_us: u32,
16399    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16400    pub distance: f32,
16401    #[doc = "Temperature"]
16402    pub temperature: i16,
16403    #[doc = "Sensor ID"]
16404    pub sensor_id: u8,
16405    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16406    pub quality: u8,
16407}
16408impl HIL_OPTICAL_FLOW_DATA {
16409    pub const ENCODED_LEN: usize = 44usize;
16410    pub const DEFAULT: Self = Self {
16411        time_usec: 0_u64,
16412        integration_time_us: 0_u32,
16413        integrated_x: 0.0_f32,
16414        integrated_y: 0.0_f32,
16415        integrated_xgyro: 0.0_f32,
16416        integrated_ygyro: 0.0_f32,
16417        integrated_zgyro: 0.0_f32,
16418        time_delta_distance_us: 0_u32,
16419        distance: 0.0_f32,
16420        temperature: 0_i16,
16421        sensor_id: 0_u8,
16422        quality: 0_u8,
16423    };
16424    #[cfg(feature = "arbitrary")]
16425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16426        use arbitrary::{Arbitrary, Unstructured};
16427        let mut buf = [0u8; 1024];
16428        rng.fill_bytes(&mut buf);
16429        let mut unstructured = Unstructured::new(&buf);
16430        Self::arbitrary(&mut unstructured).unwrap_or_default()
16431    }
16432}
16433impl Default for HIL_OPTICAL_FLOW_DATA {
16434    fn default() -> Self {
16435        Self::DEFAULT.clone()
16436    }
16437}
16438impl MessageData for HIL_OPTICAL_FLOW_DATA {
16439    type Message = MavMessage;
16440    const ID: u32 = 114u32;
16441    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16442    const EXTRA_CRC: u8 = 237u8;
16443    const ENCODED_LEN: usize = 44usize;
16444    fn deser(
16445        _version: MavlinkVersion,
16446        __input: &[u8],
16447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16448        let avail_len = __input.len();
16449        let mut payload_buf = [0; Self::ENCODED_LEN];
16450        let mut buf = if avail_len < Self::ENCODED_LEN {
16451            payload_buf[0..avail_len].copy_from_slice(__input);
16452            Bytes::new(&payload_buf)
16453        } else {
16454            Bytes::new(__input)
16455        };
16456        let mut __struct = Self::default();
16457        __struct.time_usec = buf.get_u64_le();
16458        __struct.integration_time_us = buf.get_u32_le();
16459        __struct.integrated_x = buf.get_f32_le();
16460        __struct.integrated_y = buf.get_f32_le();
16461        __struct.integrated_xgyro = buf.get_f32_le();
16462        __struct.integrated_ygyro = buf.get_f32_le();
16463        __struct.integrated_zgyro = buf.get_f32_le();
16464        __struct.time_delta_distance_us = buf.get_u32_le();
16465        __struct.distance = buf.get_f32_le();
16466        __struct.temperature = buf.get_i16_le();
16467        __struct.sensor_id = buf.get_u8();
16468        __struct.quality = buf.get_u8();
16469        Ok(__struct)
16470    }
16471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16472        let mut __tmp = BytesMut::new(bytes);
16473        #[allow(clippy::absurd_extreme_comparisons)]
16474        #[allow(unused_comparisons)]
16475        if __tmp.remaining() < Self::ENCODED_LEN {
16476            panic!(
16477                "buffer is too small (need {} bytes, but got {})",
16478                Self::ENCODED_LEN,
16479                __tmp.remaining(),
16480            )
16481        }
16482        __tmp.put_u64_le(self.time_usec);
16483        __tmp.put_u32_le(self.integration_time_us);
16484        __tmp.put_f32_le(self.integrated_x);
16485        __tmp.put_f32_le(self.integrated_y);
16486        __tmp.put_f32_le(self.integrated_xgyro);
16487        __tmp.put_f32_le(self.integrated_ygyro);
16488        __tmp.put_f32_le(self.integrated_zgyro);
16489        __tmp.put_u32_le(self.time_delta_distance_us);
16490        __tmp.put_f32_le(self.distance);
16491        __tmp.put_i16_le(self.temperature);
16492        __tmp.put_u8(self.sensor_id);
16493        __tmp.put_u8(self.quality);
16494        if matches!(version, MavlinkVersion::V2) {
16495            let len = __tmp.len();
16496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16497        } else {
16498            __tmp.len()
16499        }
16500    }
16501}
16502#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16503#[doc = ""]
16504#[doc = "ID: 92"]
16505#[derive(Debug, Clone, PartialEq)]
16506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16508#[cfg_attr(feature = "ts", derive(TS))]
16509#[cfg_attr(feature = "ts", ts(export))]
16510pub struct HIL_RC_INPUTS_RAW_DATA {
16511    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16512    pub time_usec: u64,
16513    #[doc = "RC channel 1 value"]
16514    pub chan1_raw: u16,
16515    #[doc = "RC channel 2 value"]
16516    pub chan2_raw: u16,
16517    #[doc = "RC channel 3 value"]
16518    pub chan3_raw: u16,
16519    #[doc = "RC channel 4 value"]
16520    pub chan4_raw: u16,
16521    #[doc = "RC channel 5 value"]
16522    pub chan5_raw: u16,
16523    #[doc = "RC channel 6 value"]
16524    pub chan6_raw: u16,
16525    #[doc = "RC channel 7 value"]
16526    pub chan7_raw: u16,
16527    #[doc = "RC channel 8 value"]
16528    pub chan8_raw: u16,
16529    #[doc = "RC channel 9 value"]
16530    pub chan9_raw: u16,
16531    #[doc = "RC channel 10 value"]
16532    pub chan10_raw: u16,
16533    #[doc = "RC channel 11 value"]
16534    pub chan11_raw: u16,
16535    #[doc = "RC channel 12 value"]
16536    pub chan12_raw: u16,
16537    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16538    pub rssi: u8,
16539}
16540impl HIL_RC_INPUTS_RAW_DATA {
16541    pub const ENCODED_LEN: usize = 33usize;
16542    pub const DEFAULT: Self = Self {
16543        time_usec: 0_u64,
16544        chan1_raw: 0_u16,
16545        chan2_raw: 0_u16,
16546        chan3_raw: 0_u16,
16547        chan4_raw: 0_u16,
16548        chan5_raw: 0_u16,
16549        chan6_raw: 0_u16,
16550        chan7_raw: 0_u16,
16551        chan8_raw: 0_u16,
16552        chan9_raw: 0_u16,
16553        chan10_raw: 0_u16,
16554        chan11_raw: 0_u16,
16555        chan12_raw: 0_u16,
16556        rssi: 0_u8,
16557    };
16558    #[cfg(feature = "arbitrary")]
16559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16560        use arbitrary::{Arbitrary, Unstructured};
16561        let mut buf = [0u8; 1024];
16562        rng.fill_bytes(&mut buf);
16563        let mut unstructured = Unstructured::new(&buf);
16564        Self::arbitrary(&mut unstructured).unwrap_or_default()
16565    }
16566}
16567impl Default for HIL_RC_INPUTS_RAW_DATA {
16568    fn default() -> Self {
16569        Self::DEFAULT.clone()
16570    }
16571}
16572impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16573    type Message = MavMessage;
16574    const ID: u32 = 92u32;
16575    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16576    const EXTRA_CRC: u8 = 54u8;
16577    const ENCODED_LEN: usize = 33usize;
16578    fn deser(
16579        _version: MavlinkVersion,
16580        __input: &[u8],
16581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16582        let avail_len = __input.len();
16583        let mut payload_buf = [0; Self::ENCODED_LEN];
16584        let mut buf = if avail_len < Self::ENCODED_LEN {
16585            payload_buf[0..avail_len].copy_from_slice(__input);
16586            Bytes::new(&payload_buf)
16587        } else {
16588            Bytes::new(__input)
16589        };
16590        let mut __struct = Self::default();
16591        __struct.time_usec = buf.get_u64_le();
16592        __struct.chan1_raw = buf.get_u16_le();
16593        __struct.chan2_raw = buf.get_u16_le();
16594        __struct.chan3_raw = buf.get_u16_le();
16595        __struct.chan4_raw = buf.get_u16_le();
16596        __struct.chan5_raw = buf.get_u16_le();
16597        __struct.chan6_raw = buf.get_u16_le();
16598        __struct.chan7_raw = buf.get_u16_le();
16599        __struct.chan8_raw = buf.get_u16_le();
16600        __struct.chan9_raw = buf.get_u16_le();
16601        __struct.chan10_raw = buf.get_u16_le();
16602        __struct.chan11_raw = buf.get_u16_le();
16603        __struct.chan12_raw = buf.get_u16_le();
16604        __struct.rssi = buf.get_u8();
16605        Ok(__struct)
16606    }
16607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16608        let mut __tmp = BytesMut::new(bytes);
16609        #[allow(clippy::absurd_extreme_comparisons)]
16610        #[allow(unused_comparisons)]
16611        if __tmp.remaining() < Self::ENCODED_LEN {
16612            panic!(
16613                "buffer is too small (need {} bytes, but got {})",
16614                Self::ENCODED_LEN,
16615                __tmp.remaining(),
16616            )
16617        }
16618        __tmp.put_u64_le(self.time_usec);
16619        __tmp.put_u16_le(self.chan1_raw);
16620        __tmp.put_u16_le(self.chan2_raw);
16621        __tmp.put_u16_le(self.chan3_raw);
16622        __tmp.put_u16_le(self.chan4_raw);
16623        __tmp.put_u16_le(self.chan5_raw);
16624        __tmp.put_u16_le(self.chan6_raw);
16625        __tmp.put_u16_le(self.chan7_raw);
16626        __tmp.put_u16_le(self.chan8_raw);
16627        __tmp.put_u16_le(self.chan9_raw);
16628        __tmp.put_u16_le(self.chan10_raw);
16629        __tmp.put_u16_le(self.chan11_raw);
16630        __tmp.put_u16_le(self.chan12_raw);
16631        __tmp.put_u8(self.rssi);
16632        if matches!(version, MavlinkVersion::V2) {
16633            let len = __tmp.len();
16634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16635        } else {
16636            __tmp.len()
16637        }
16638    }
16639}
16640#[doc = "The IMU readings in SI units in NED body frame."]
16641#[doc = ""]
16642#[doc = "ID: 107"]
16643#[derive(Debug, Clone, PartialEq)]
16644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16646#[cfg_attr(feature = "ts", derive(TS))]
16647#[cfg_attr(feature = "ts", ts(export))]
16648pub struct HIL_SENSOR_DATA {
16649    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16650    pub time_usec: u64,
16651    #[doc = "X acceleration"]
16652    pub xacc: f32,
16653    #[doc = "Y acceleration"]
16654    pub yacc: f32,
16655    #[doc = "Z acceleration"]
16656    pub zacc: f32,
16657    #[doc = "Angular speed around X axis in body frame"]
16658    pub xgyro: f32,
16659    #[doc = "Angular speed around Y axis in body frame"]
16660    pub ygyro: f32,
16661    #[doc = "Angular speed around Z axis in body frame"]
16662    pub zgyro: f32,
16663    #[doc = "X Magnetic field"]
16664    pub xmag: f32,
16665    #[doc = "Y Magnetic field"]
16666    pub ymag: f32,
16667    #[doc = "Z Magnetic field"]
16668    pub zmag: f32,
16669    #[doc = "Absolute pressure"]
16670    pub abs_pressure: f32,
16671    #[doc = "Differential pressure (airspeed)"]
16672    pub diff_pressure: f32,
16673    #[doc = "Altitude calculated from pressure"]
16674    pub pressure_alt: f32,
16675    #[doc = "Temperature"]
16676    pub temperature: f32,
16677    #[doc = "Bitmap for fields that have updated since last message"]
16678    pub fields_updated: HilSensorUpdatedFlags,
16679    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16681    pub id: u8,
16682}
16683impl HIL_SENSOR_DATA {
16684    pub const ENCODED_LEN: usize = 65usize;
16685    pub const DEFAULT: Self = Self {
16686        time_usec: 0_u64,
16687        xacc: 0.0_f32,
16688        yacc: 0.0_f32,
16689        zacc: 0.0_f32,
16690        xgyro: 0.0_f32,
16691        ygyro: 0.0_f32,
16692        zgyro: 0.0_f32,
16693        xmag: 0.0_f32,
16694        ymag: 0.0_f32,
16695        zmag: 0.0_f32,
16696        abs_pressure: 0.0_f32,
16697        diff_pressure: 0.0_f32,
16698        pressure_alt: 0.0_f32,
16699        temperature: 0.0_f32,
16700        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16701        id: 0_u8,
16702    };
16703    #[cfg(feature = "arbitrary")]
16704    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16705        use arbitrary::{Arbitrary, Unstructured};
16706        let mut buf = [0u8; 1024];
16707        rng.fill_bytes(&mut buf);
16708        let mut unstructured = Unstructured::new(&buf);
16709        Self::arbitrary(&mut unstructured).unwrap_or_default()
16710    }
16711}
16712impl Default for HIL_SENSOR_DATA {
16713    fn default() -> Self {
16714        Self::DEFAULT.clone()
16715    }
16716}
16717impl MessageData for HIL_SENSOR_DATA {
16718    type Message = MavMessage;
16719    const ID: u32 = 107u32;
16720    const NAME: &'static str = "HIL_SENSOR";
16721    const EXTRA_CRC: u8 = 108u8;
16722    const ENCODED_LEN: usize = 65usize;
16723    fn deser(
16724        _version: MavlinkVersion,
16725        __input: &[u8],
16726    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16727        let avail_len = __input.len();
16728        let mut payload_buf = [0; Self::ENCODED_LEN];
16729        let mut buf = if avail_len < Self::ENCODED_LEN {
16730            payload_buf[0..avail_len].copy_from_slice(__input);
16731            Bytes::new(&payload_buf)
16732        } else {
16733            Bytes::new(__input)
16734        };
16735        let mut __struct = Self::default();
16736        __struct.time_usec = buf.get_u64_le();
16737        __struct.xacc = buf.get_f32_le();
16738        __struct.yacc = buf.get_f32_le();
16739        __struct.zacc = buf.get_f32_le();
16740        __struct.xgyro = buf.get_f32_le();
16741        __struct.ygyro = buf.get_f32_le();
16742        __struct.zgyro = buf.get_f32_le();
16743        __struct.xmag = buf.get_f32_le();
16744        __struct.ymag = buf.get_f32_le();
16745        __struct.zmag = buf.get_f32_le();
16746        __struct.abs_pressure = buf.get_f32_le();
16747        __struct.diff_pressure = buf.get_f32_le();
16748        __struct.pressure_alt = buf.get_f32_le();
16749        __struct.temperature = buf.get_f32_le();
16750        let tmp = buf.get_u32_le();
16751        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16752            tmp & HilSensorUpdatedFlags::all().bits(),
16753        )
16754        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16755            flag_type: "HilSensorUpdatedFlags",
16756            value: tmp as u32,
16757        })?;
16758        __struct.id = buf.get_u8();
16759        Ok(__struct)
16760    }
16761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16762        let mut __tmp = BytesMut::new(bytes);
16763        #[allow(clippy::absurd_extreme_comparisons)]
16764        #[allow(unused_comparisons)]
16765        if __tmp.remaining() < Self::ENCODED_LEN {
16766            panic!(
16767                "buffer is too small (need {} bytes, but got {})",
16768                Self::ENCODED_LEN,
16769                __tmp.remaining(),
16770            )
16771        }
16772        __tmp.put_u64_le(self.time_usec);
16773        __tmp.put_f32_le(self.xacc);
16774        __tmp.put_f32_le(self.yacc);
16775        __tmp.put_f32_le(self.zacc);
16776        __tmp.put_f32_le(self.xgyro);
16777        __tmp.put_f32_le(self.ygyro);
16778        __tmp.put_f32_le(self.zgyro);
16779        __tmp.put_f32_le(self.xmag);
16780        __tmp.put_f32_le(self.ymag);
16781        __tmp.put_f32_le(self.zmag);
16782        __tmp.put_f32_le(self.abs_pressure);
16783        __tmp.put_f32_le(self.diff_pressure);
16784        __tmp.put_f32_le(self.pressure_alt);
16785        __tmp.put_f32_le(self.temperature);
16786        __tmp.put_u32_le(self.fields_updated.bits());
16787        if matches!(version, MavlinkVersion::V2) {
16788            __tmp.put_u8(self.id);
16789            let len = __tmp.len();
16790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16791        } else {
16792            __tmp.len()
16793        }
16794    }
16795}
16796#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16797#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16798#[doc = ""]
16799#[doc = "ID: 90"]
16800#[derive(Debug, Clone, PartialEq)]
16801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16803#[cfg_attr(feature = "ts", derive(TS))]
16804#[cfg_attr(feature = "ts", ts(export))]
16805pub struct HIL_STATE_DATA {
16806    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16807    pub time_usec: u64,
16808    #[doc = "Roll angle"]
16809    pub roll: f32,
16810    #[doc = "Pitch angle"]
16811    pub pitch: f32,
16812    #[doc = "Yaw angle"]
16813    pub yaw: f32,
16814    #[doc = "Body frame roll / phi angular speed"]
16815    pub rollspeed: f32,
16816    #[doc = "Body frame pitch / theta angular speed"]
16817    pub pitchspeed: f32,
16818    #[doc = "Body frame yaw / psi angular speed"]
16819    pub yawspeed: f32,
16820    #[doc = "Latitude"]
16821    pub lat: i32,
16822    #[doc = "Longitude"]
16823    pub lon: i32,
16824    #[doc = "Altitude"]
16825    pub alt: i32,
16826    #[doc = "Ground X Speed (Latitude)"]
16827    pub vx: i16,
16828    #[doc = "Ground Y Speed (Longitude)"]
16829    pub vy: i16,
16830    #[doc = "Ground Z Speed (Altitude)"]
16831    pub vz: i16,
16832    #[doc = "X acceleration"]
16833    pub xacc: i16,
16834    #[doc = "Y acceleration"]
16835    pub yacc: i16,
16836    #[doc = "Z acceleration"]
16837    pub zacc: i16,
16838}
16839impl HIL_STATE_DATA {
16840    pub const ENCODED_LEN: usize = 56usize;
16841    pub const DEFAULT: Self = Self {
16842        time_usec: 0_u64,
16843        roll: 0.0_f32,
16844        pitch: 0.0_f32,
16845        yaw: 0.0_f32,
16846        rollspeed: 0.0_f32,
16847        pitchspeed: 0.0_f32,
16848        yawspeed: 0.0_f32,
16849        lat: 0_i32,
16850        lon: 0_i32,
16851        alt: 0_i32,
16852        vx: 0_i16,
16853        vy: 0_i16,
16854        vz: 0_i16,
16855        xacc: 0_i16,
16856        yacc: 0_i16,
16857        zacc: 0_i16,
16858    };
16859    #[cfg(feature = "arbitrary")]
16860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16861        use arbitrary::{Arbitrary, Unstructured};
16862        let mut buf = [0u8; 1024];
16863        rng.fill_bytes(&mut buf);
16864        let mut unstructured = Unstructured::new(&buf);
16865        Self::arbitrary(&mut unstructured).unwrap_or_default()
16866    }
16867}
16868impl Default for HIL_STATE_DATA {
16869    fn default() -> Self {
16870        Self::DEFAULT.clone()
16871    }
16872}
16873impl MessageData for HIL_STATE_DATA {
16874    type Message = MavMessage;
16875    const ID: u32 = 90u32;
16876    const NAME: &'static str = "HIL_STATE";
16877    const EXTRA_CRC: u8 = 183u8;
16878    const ENCODED_LEN: usize = 56usize;
16879    fn deser(
16880        _version: MavlinkVersion,
16881        __input: &[u8],
16882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16883        let avail_len = __input.len();
16884        let mut payload_buf = [0; Self::ENCODED_LEN];
16885        let mut buf = if avail_len < Self::ENCODED_LEN {
16886            payload_buf[0..avail_len].copy_from_slice(__input);
16887            Bytes::new(&payload_buf)
16888        } else {
16889            Bytes::new(__input)
16890        };
16891        let mut __struct = Self::default();
16892        __struct.time_usec = buf.get_u64_le();
16893        __struct.roll = buf.get_f32_le();
16894        __struct.pitch = buf.get_f32_le();
16895        __struct.yaw = buf.get_f32_le();
16896        __struct.rollspeed = buf.get_f32_le();
16897        __struct.pitchspeed = buf.get_f32_le();
16898        __struct.yawspeed = buf.get_f32_le();
16899        __struct.lat = buf.get_i32_le();
16900        __struct.lon = buf.get_i32_le();
16901        __struct.alt = buf.get_i32_le();
16902        __struct.vx = buf.get_i16_le();
16903        __struct.vy = buf.get_i16_le();
16904        __struct.vz = buf.get_i16_le();
16905        __struct.xacc = buf.get_i16_le();
16906        __struct.yacc = buf.get_i16_le();
16907        __struct.zacc = buf.get_i16_le();
16908        Ok(__struct)
16909    }
16910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16911        let mut __tmp = BytesMut::new(bytes);
16912        #[allow(clippy::absurd_extreme_comparisons)]
16913        #[allow(unused_comparisons)]
16914        if __tmp.remaining() < Self::ENCODED_LEN {
16915            panic!(
16916                "buffer is too small (need {} bytes, but got {})",
16917                Self::ENCODED_LEN,
16918                __tmp.remaining(),
16919            )
16920        }
16921        __tmp.put_u64_le(self.time_usec);
16922        __tmp.put_f32_le(self.roll);
16923        __tmp.put_f32_le(self.pitch);
16924        __tmp.put_f32_le(self.yaw);
16925        __tmp.put_f32_le(self.rollspeed);
16926        __tmp.put_f32_le(self.pitchspeed);
16927        __tmp.put_f32_le(self.yawspeed);
16928        __tmp.put_i32_le(self.lat);
16929        __tmp.put_i32_le(self.lon);
16930        __tmp.put_i32_le(self.alt);
16931        __tmp.put_i16_le(self.vx);
16932        __tmp.put_i16_le(self.vy);
16933        __tmp.put_i16_le(self.vz);
16934        __tmp.put_i16_le(self.xacc);
16935        __tmp.put_i16_le(self.yacc);
16936        __tmp.put_i16_le(self.zacc);
16937        if matches!(version, MavlinkVersion::V2) {
16938            let len = __tmp.len();
16939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16940        } else {
16941            __tmp.len()
16942        }
16943    }
16944}
16945#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16946#[doc = ""]
16947#[doc = "ID: 115"]
16948#[derive(Debug, Clone, PartialEq)]
16949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16951#[cfg_attr(feature = "ts", derive(TS))]
16952#[cfg_attr(feature = "ts", ts(export))]
16953pub struct HIL_STATE_QUATERNION_DATA {
16954    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16955    pub time_usec: u64,
16956    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16959    pub attitude_quaternion: [f32; 4],
16960    #[doc = "Body frame roll / phi angular speed"]
16961    pub rollspeed: f32,
16962    #[doc = "Body frame pitch / theta angular speed"]
16963    pub pitchspeed: f32,
16964    #[doc = "Body frame yaw / psi angular speed"]
16965    pub yawspeed: f32,
16966    #[doc = "Latitude"]
16967    pub lat: i32,
16968    #[doc = "Longitude"]
16969    pub lon: i32,
16970    #[doc = "Altitude"]
16971    pub alt: i32,
16972    #[doc = "Ground X Speed (Latitude)"]
16973    pub vx: i16,
16974    #[doc = "Ground Y Speed (Longitude)"]
16975    pub vy: i16,
16976    #[doc = "Ground Z Speed (Altitude)"]
16977    pub vz: i16,
16978    #[doc = "Indicated airspeed"]
16979    pub ind_airspeed: u16,
16980    #[doc = "True airspeed"]
16981    pub true_airspeed: u16,
16982    #[doc = "X acceleration"]
16983    pub xacc: i16,
16984    #[doc = "Y acceleration"]
16985    pub yacc: i16,
16986    #[doc = "Z acceleration"]
16987    pub zacc: i16,
16988}
16989impl HIL_STATE_QUATERNION_DATA {
16990    pub const ENCODED_LEN: usize = 64usize;
16991    pub const DEFAULT: Self = Self {
16992        time_usec: 0_u64,
16993        attitude_quaternion: [0.0_f32; 4usize],
16994        rollspeed: 0.0_f32,
16995        pitchspeed: 0.0_f32,
16996        yawspeed: 0.0_f32,
16997        lat: 0_i32,
16998        lon: 0_i32,
16999        alt: 0_i32,
17000        vx: 0_i16,
17001        vy: 0_i16,
17002        vz: 0_i16,
17003        ind_airspeed: 0_u16,
17004        true_airspeed: 0_u16,
17005        xacc: 0_i16,
17006        yacc: 0_i16,
17007        zacc: 0_i16,
17008    };
17009    #[cfg(feature = "arbitrary")]
17010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17011        use arbitrary::{Arbitrary, Unstructured};
17012        let mut buf = [0u8; 1024];
17013        rng.fill_bytes(&mut buf);
17014        let mut unstructured = Unstructured::new(&buf);
17015        Self::arbitrary(&mut unstructured).unwrap_or_default()
17016    }
17017}
17018impl Default for HIL_STATE_QUATERNION_DATA {
17019    fn default() -> Self {
17020        Self::DEFAULT.clone()
17021    }
17022}
17023impl MessageData for HIL_STATE_QUATERNION_DATA {
17024    type Message = MavMessage;
17025    const ID: u32 = 115u32;
17026    const NAME: &'static str = "HIL_STATE_QUATERNION";
17027    const EXTRA_CRC: u8 = 4u8;
17028    const ENCODED_LEN: usize = 64usize;
17029    fn deser(
17030        _version: MavlinkVersion,
17031        __input: &[u8],
17032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17033        let avail_len = __input.len();
17034        let mut payload_buf = [0; Self::ENCODED_LEN];
17035        let mut buf = if avail_len < Self::ENCODED_LEN {
17036            payload_buf[0..avail_len].copy_from_slice(__input);
17037            Bytes::new(&payload_buf)
17038        } else {
17039            Bytes::new(__input)
17040        };
17041        let mut __struct = Self::default();
17042        __struct.time_usec = buf.get_u64_le();
17043        for v in &mut __struct.attitude_quaternion {
17044            let val = buf.get_f32_le();
17045            *v = val;
17046        }
17047        __struct.rollspeed = buf.get_f32_le();
17048        __struct.pitchspeed = buf.get_f32_le();
17049        __struct.yawspeed = buf.get_f32_le();
17050        __struct.lat = buf.get_i32_le();
17051        __struct.lon = buf.get_i32_le();
17052        __struct.alt = buf.get_i32_le();
17053        __struct.vx = buf.get_i16_le();
17054        __struct.vy = buf.get_i16_le();
17055        __struct.vz = buf.get_i16_le();
17056        __struct.ind_airspeed = buf.get_u16_le();
17057        __struct.true_airspeed = buf.get_u16_le();
17058        __struct.xacc = buf.get_i16_le();
17059        __struct.yacc = buf.get_i16_le();
17060        __struct.zacc = buf.get_i16_le();
17061        Ok(__struct)
17062    }
17063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17064        let mut __tmp = BytesMut::new(bytes);
17065        #[allow(clippy::absurd_extreme_comparisons)]
17066        #[allow(unused_comparisons)]
17067        if __tmp.remaining() < Self::ENCODED_LEN {
17068            panic!(
17069                "buffer is too small (need {} bytes, but got {})",
17070                Self::ENCODED_LEN,
17071                __tmp.remaining(),
17072            )
17073        }
17074        __tmp.put_u64_le(self.time_usec);
17075        for val in &self.attitude_quaternion {
17076            __tmp.put_f32_le(*val);
17077        }
17078        __tmp.put_f32_le(self.rollspeed);
17079        __tmp.put_f32_le(self.pitchspeed);
17080        __tmp.put_f32_le(self.yawspeed);
17081        __tmp.put_i32_le(self.lat);
17082        __tmp.put_i32_le(self.lon);
17083        __tmp.put_i32_le(self.alt);
17084        __tmp.put_i16_le(self.vx);
17085        __tmp.put_i16_le(self.vy);
17086        __tmp.put_i16_le(self.vz);
17087        __tmp.put_u16_le(self.ind_airspeed);
17088        __tmp.put_u16_le(self.true_airspeed);
17089        __tmp.put_i16_le(self.xacc);
17090        __tmp.put_i16_le(self.yacc);
17091        __tmp.put_i16_le(self.zacc);
17092        if matches!(version, MavlinkVersion::V2) {
17093            let len = __tmp.len();
17094            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17095        } else {
17096            __tmp.len()
17097        }
17098    }
17099}
17100#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17101#[doc = ""]
17102#[doc = "ID: 242"]
17103#[derive(Debug, Clone, PartialEq)]
17104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17106#[cfg_attr(feature = "ts", derive(TS))]
17107#[cfg_attr(feature = "ts", ts(export))]
17108pub struct HOME_POSITION_DATA {
17109    #[doc = "Latitude (WGS84)"]
17110    pub latitude: i32,
17111    #[doc = "Longitude (WGS84)"]
17112    pub longitude: i32,
17113    #[doc = "Altitude (MSL). Positive for up."]
17114    pub altitude: i32,
17115    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17116    pub x: f32,
17117    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17118    pub y: f32,
17119    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17120    pub z: f32,
17121    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17122    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17123    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17124    pub q: [f32; 4],
17125    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17126    pub approach_x: f32,
17127    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17128    pub approach_y: f32,
17129    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17130    pub approach_z: f32,
17131    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17133    pub time_usec: u64,
17134}
17135impl HOME_POSITION_DATA {
17136    pub const ENCODED_LEN: usize = 60usize;
17137    pub const DEFAULT: Self = Self {
17138        latitude: 0_i32,
17139        longitude: 0_i32,
17140        altitude: 0_i32,
17141        x: 0.0_f32,
17142        y: 0.0_f32,
17143        z: 0.0_f32,
17144        q: [0.0_f32; 4usize],
17145        approach_x: 0.0_f32,
17146        approach_y: 0.0_f32,
17147        approach_z: 0.0_f32,
17148        time_usec: 0_u64,
17149    };
17150    #[cfg(feature = "arbitrary")]
17151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17152        use arbitrary::{Arbitrary, Unstructured};
17153        let mut buf = [0u8; 1024];
17154        rng.fill_bytes(&mut buf);
17155        let mut unstructured = Unstructured::new(&buf);
17156        Self::arbitrary(&mut unstructured).unwrap_or_default()
17157    }
17158}
17159impl Default for HOME_POSITION_DATA {
17160    fn default() -> Self {
17161        Self::DEFAULT.clone()
17162    }
17163}
17164impl MessageData for HOME_POSITION_DATA {
17165    type Message = MavMessage;
17166    const ID: u32 = 242u32;
17167    const NAME: &'static str = "HOME_POSITION";
17168    const EXTRA_CRC: u8 = 104u8;
17169    const ENCODED_LEN: usize = 60usize;
17170    fn deser(
17171        _version: MavlinkVersion,
17172        __input: &[u8],
17173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17174        let avail_len = __input.len();
17175        let mut payload_buf = [0; Self::ENCODED_LEN];
17176        let mut buf = if avail_len < Self::ENCODED_LEN {
17177            payload_buf[0..avail_len].copy_from_slice(__input);
17178            Bytes::new(&payload_buf)
17179        } else {
17180            Bytes::new(__input)
17181        };
17182        let mut __struct = Self::default();
17183        __struct.latitude = buf.get_i32_le();
17184        __struct.longitude = buf.get_i32_le();
17185        __struct.altitude = buf.get_i32_le();
17186        __struct.x = buf.get_f32_le();
17187        __struct.y = buf.get_f32_le();
17188        __struct.z = buf.get_f32_le();
17189        for v in &mut __struct.q {
17190            let val = buf.get_f32_le();
17191            *v = val;
17192        }
17193        __struct.approach_x = buf.get_f32_le();
17194        __struct.approach_y = buf.get_f32_le();
17195        __struct.approach_z = buf.get_f32_le();
17196        __struct.time_usec = buf.get_u64_le();
17197        Ok(__struct)
17198    }
17199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17200        let mut __tmp = BytesMut::new(bytes);
17201        #[allow(clippy::absurd_extreme_comparisons)]
17202        #[allow(unused_comparisons)]
17203        if __tmp.remaining() < Self::ENCODED_LEN {
17204            panic!(
17205                "buffer is too small (need {} bytes, but got {})",
17206                Self::ENCODED_LEN,
17207                __tmp.remaining(),
17208            )
17209        }
17210        __tmp.put_i32_le(self.latitude);
17211        __tmp.put_i32_le(self.longitude);
17212        __tmp.put_i32_le(self.altitude);
17213        __tmp.put_f32_le(self.x);
17214        __tmp.put_f32_le(self.y);
17215        __tmp.put_f32_le(self.z);
17216        for val in &self.q {
17217            __tmp.put_f32_le(*val);
17218        }
17219        __tmp.put_f32_le(self.approach_x);
17220        __tmp.put_f32_le(self.approach_y);
17221        __tmp.put_f32_le(self.approach_z);
17222        if matches!(version, MavlinkVersion::V2) {
17223            __tmp.put_u64_le(self.time_usec);
17224            let len = __tmp.len();
17225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17226        } else {
17227            __tmp.len()
17228        }
17229    }
17230}
17231#[doc = "Temperature and humidity from hygrometer."]
17232#[doc = ""]
17233#[doc = "ID: 12920"]
17234#[derive(Debug, Clone, PartialEq)]
17235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17237#[cfg_attr(feature = "ts", derive(TS))]
17238#[cfg_attr(feature = "ts", ts(export))]
17239pub struct HYGROMETER_SENSOR_DATA {
17240    #[doc = "Temperature"]
17241    pub temperature: i16,
17242    #[doc = "Humidity"]
17243    pub humidity: u16,
17244    #[doc = "Hygrometer ID"]
17245    pub id: u8,
17246}
17247impl HYGROMETER_SENSOR_DATA {
17248    pub const ENCODED_LEN: usize = 5usize;
17249    pub const DEFAULT: Self = Self {
17250        temperature: 0_i16,
17251        humidity: 0_u16,
17252        id: 0_u8,
17253    };
17254    #[cfg(feature = "arbitrary")]
17255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17256        use arbitrary::{Arbitrary, Unstructured};
17257        let mut buf = [0u8; 1024];
17258        rng.fill_bytes(&mut buf);
17259        let mut unstructured = Unstructured::new(&buf);
17260        Self::arbitrary(&mut unstructured).unwrap_or_default()
17261    }
17262}
17263impl Default for HYGROMETER_SENSOR_DATA {
17264    fn default() -> Self {
17265        Self::DEFAULT.clone()
17266    }
17267}
17268impl MessageData for HYGROMETER_SENSOR_DATA {
17269    type Message = MavMessage;
17270    const ID: u32 = 12920u32;
17271    const NAME: &'static str = "HYGROMETER_SENSOR";
17272    const EXTRA_CRC: u8 = 20u8;
17273    const ENCODED_LEN: usize = 5usize;
17274    fn deser(
17275        _version: MavlinkVersion,
17276        __input: &[u8],
17277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17278        let avail_len = __input.len();
17279        let mut payload_buf = [0; Self::ENCODED_LEN];
17280        let mut buf = if avail_len < Self::ENCODED_LEN {
17281            payload_buf[0..avail_len].copy_from_slice(__input);
17282            Bytes::new(&payload_buf)
17283        } else {
17284            Bytes::new(__input)
17285        };
17286        let mut __struct = Self::default();
17287        __struct.temperature = buf.get_i16_le();
17288        __struct.humidity = buf.get_u16_le();
17289        __struct.id = buf.get_u8();
17290        Ok(__struct)
17291    }
17292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17293        let mut __tmp = BytesMut::new(bytes);
17294        #[allow(clippy::absurd_extreme_comparisons)]
17295        #[allow(unused_comparisons)]
17296        if __tmp.remaining() < Self::ENCODED_LEN {
17297            panic!(
17298                "buffer is too small (need {} bytes, but got {})",
17299                Self::ENCODED_LEN,
17300                __tmp.remaining(),
17301            )
17302        }
17303        __tmp.put_i16_le(self.temperature);
17304        __tmp.put_u16_le(self.humidity);
17305        __tmp.put_u8(self.id);
17306        if matches!(version, MavlinkVersion::V2) {
17307            let len = __tmp.len();
17308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17309        } else {
17310            __tmp.len()
17311        }
17312    }
17313}
17314#[doc = "Illuminator status."]
17315#[doc = ""]
17316#[doc = "ID: 440"]
17317#[derive(Debug, Clone, PartialEq)]
17318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17320#[cfg_attr(feature = "ts", derive(TS))]
17321#[cfg_attr(feature = "ts", ts(export))]
17322pub struct ILLUMINATOR_STATUS_DATA {
17323    #[doc = "Time since the start-up of the illuminator in ms"]
17324    pub uptime_ms: u32,
17325    #[doc = "Errors"]
17326    pub error_status: IlluminatorErrorFlags,
17327    #[doc = "Illuminator brightness"]
17328    pub brightness: f32,
17329    #[doc = "Illuminator strobing period in seconds"]
17330    pub strobe_period: f32,
17331    #[doc = "Illuminator strobing duty cycle"]
17332    pub strobe_duty_cycle: f32,
17333    #[doc = "Temperature in Celsius"]
17334    pub temp_c: f32,
17335    #[doc = "Minimum strobing period in seconds"]
17336    pub min_strobe_period: f32,
17337    #[doc = "Maximum strobing period in seconds"]
17338    pub max_strobe_period: f32,
17339    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17340    pub enable: u8,
17341    #[doc = "Supported illuminator modes"]
17342    pub mode_bitmask: IlluminatorMode,
17343    #[doc = "Illuminator mode"]
17344    pub mode: IlluminatorMode,
17345}
17346impl ILLUMINATOR_STATUS_DATA {
17347    pub const ENCODED_LEN: usize = 35usize;
17348    pub const DEFAULT: Self = Self {
17349        uptime_ms: 0_u32,
17350        error_status: IlluminatorErrorFlags::DEFAULT,
17351        brightness: 0.0_f32,
17352        strobe_period: 0.0_f32,
17353        strobe_duty_cycle: 0.0_f32,
17354        temp_c: 0.0_f32,
17355        min_strobe_period: 0.0_f32,
17356        max_strobe_period: 0.0_f32,
17357        enable: 0_u8,
17358        mode_bitmask: IlluminatorMode::DEFAULT,
17359        mode: IlluminatorMode::DEFAULT,
17360    };
17361    #[cfg(feature = "arbitrary")]
17362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17363        use arbitrary::{Arbitrary, Unstructured};
17364        let mut buf = [0u8; 1024];
17365        rng.fill_bytes(&mut buf);
17366        let mut unstructured = Unstructured::new(&buf);
17367        Self::arbitrary(&mut unstructured).unwrap_or_default()
17368    }
17369}
17370impl Default for ILLUMINATOR_STATUS_DATA {
17371    fn default() -> Self {
17372        Self::DEFAULT.clone()
17373    }
17374}
17375impl MessageData for ILLUMINATOR_STATUS_DATA {
17376    type Message = MavMessage;
17377    const ID: u32 = 440u32;
17378    const NAME: &'static str = "ILLUMINATOR_STATUS";
17379    const EXTRA_CRC: u8 = 66u8;
17380    const ENCODED_LEN: usize = 35usize;
17381    fn deser(
17382        _version: MavlinkVersion,
17383        __input: &[u8],
17384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17385        let avail_len = __input.len();
17386        let mut payload_buf = [0; Self::ENCODED_LEN];
17387        let mut buf = if avail_len < Self::ENCODED_LEN {
17388            payload_buf[0..avail_len].copy_from_slice(__input);
17389            Bytes::new(&payload_buf)
17390        } else {
17391            Bytes::new(__input)
17392        };
17393        let mut __struct = Self::default();
17394        __struct.uptime_ms = buf.get_u32_le();
17395        let tmp = buf.get_u32_le();
17396        __struct.error_status = IlluminatorErrorFlags::from_bits(
17397            tmp & IlluminatorErrorFlags::all().bits(),
17398        )
17399        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17400            flag_type: "IlluminatorErrorFlags",
17401            value: tmp as u32,
17402        })?;
17403        __struct.brightness = buf.get_f32_le();
17404        __struct.strobe_period = buf.get_f32_le();
17405        __struct.strobe_duty_cycle = buf.get_f32_le();
17406        __struct.temp_c = buf.get_f32_le();
17407        __struct.min_strobe_period = buf.get_f32_le();
17408        __struct.max_strobe_period = buf.get_f32_le();
17409        __struct.enable = buf.get_u8();
17410        let tmp = buf.get_u8();
17411        __struct.mode_bitmask =
17412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17413                enum_type: "IlluminatorMode",
17414                value: tmp as u32,
17415            })?;
17416        let tmp = buf.get_u8();
17417        __struct.mode =
17418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17419                enum_type: "IlluminatorMode",
17420                value: tmp as u32,
17421            })?;
17422        Ok(__struct)
17423    }
17424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17425        let mut __tmp = BytesMut::new(bytes);
17426        #[allow(clippy::absurd_extreme_comparisons)]
17427        #[allow(unused_comparisons)]
17428        if __tmp.remaining() < Self::ENCODED_LEN {
17429            panic!(
17430                "buffer is too small (need {} bytes, but got {})",
17431                Self::ENCODED_LEN,
17432                __tmp.remaining(),
17433            )
17434        }
17435        __tmp.put_u32_le(self.uptime_ms);
17436        __tmp.put_u32_le(self.error_status.bits());
17437        __tmp.put_f32_le(self.brightness);
17438        __tmp.put_f32_le(self.strobe_period);
17439        __tmp.put_f32_le(self.strobe_duty_cycle);
17440        __tmp.put_f32_le(self.temp_c);
17441        __tmp.put_f32_le(self.min_strobe_period);
17442        __tmp.put_f32_le(self.max_strobe_period);
17443        __tmp.put_u8(self.enable);
17444        __tmp.put_u8(self.mode_bitmask as u8);
17445        __tmp.put_u8(self.mode as u8);
17446        if matches!(version, MavlinkVersion::V2) {
17447            let len = __tmp.len();
17448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17449        } else {
17450            __tmp.len()
17451        }
17452    }
17453}
17454#[doc = "Status of the Iridium SBD link."]
17455#[doc = ""]
17456#[doc = "ID: 335"]
17457#[derive(Debug, Clone, PartialEq)]
17458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17460#[cfg_attr(feature = "ts", derive(TS))]
17461#[cfg_attr(feature = "ts", ts(export))]
17462pub struct ISBD_LINK_STATUS_DATA {
17463    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17464    pub timestamp: u64,
17465    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17466    pub last_heartbeat: u64,
17467    #[doc = "Number of failed SBD sessions."]
17468    pub failed_sessions: u16,
17469    #[doc = "Number of successful SBD sessions."]
17470    pub successful_sessions: u16,
17471    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17472    pub signal_quality: u8,
17473    #[doc = "1: Ring call pending, 0: No call pending."]
17474    pub ring_pending: u8,
17475    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17476    pub tx_session_pending: u8,
17477    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17478    pub rx_session_pending: u8,
17479}
17480impl ISBD_LINK_STATUS_DATA {
17481    pub const ENCODED_LEN: usize = 24usize;
17482    pub const DEFAULT: Self = Self {
17483        timestamp: 0_u64,
17484        last_heartbeat: 0_u64,
17485        failed_sessions: 0_u16,
17486        successful_sessions: 0_u16,
17487        signal_quality: 0_u8,
17488        ring_pending: 0_u8,
17489        tx_session_pending: 0_u8,
17490        rx_session_pending: 0_u8,
17491    };
17492    #[cfg(feature = "arbitrary")]
17493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17494        use arbitrary::{Arbitrary, Unstructured};
17495        let mut buf = [0u8; 1024];
17496        rng.fill_bytes(&mut buf);
17497        let mut unstructured = Unstructured::new(&buf);
17498        Self::arbitrary(&mut unstructured).unwrap_or_default()
17499    }
17500}
17501impl Default for ISBD_LINK_STATUS_DATA {
17502    fn default() -> Self {
17503        Self::DEFAULT.clone()
17504    }
17505}
17506impl MessageData for ISBD_LINK_STATUS_DATA {
17507    type Message = MavMessage;
17508    const ID: u32 = 335u32;
17509    const NAME: &'static str = "ISBD_LINK_STATUS";
17510    const EXTRA_CRC: u8 = 225u8;
17511    const ENCODED_LEN: usize = 24usize;
17512    fn deser(
17513        _version: MavlinkVersion,
17514        __input: &[u8],
17515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17516        let avail_len = __input.len();
17517        let mut payload_buf = [0; Self::ENCODED_LEN];
17518        let mut buf = if avail_len < Self::ENCODED_LEN {
17519            payload_buf[0..avail_len].copy_from_slice(__input);
17520            Bytes::new(&payload_buf)
17521        } else {
17522            Bytes::new(__input)
17523        };
17524        let mut __struct = Self::default();
17525        __struct.timestamp = buf.get_u64_le();
17526        __struct.last_heartbeat = buf.get_u64_le();
17527        __struct.failed_sessions = buf.get_u16_le();
17528        __struct.successful_sessions = buf.get_u16_le();
17529        __struct.signal_quality = buf.get_u8();
17530        __struct.ring_pending = buf.get_u8();
17531        __struct.tx_session_pending = buf.get_u8();
17532        __struct.rx_session_pending = buf.get_u8();
17533        Ok(__struct)
17534    }
17535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17536        let mut __tmp = BytesMut::new(bytes);
17537        #[allow(clippy::absurd_extreme_comparisons)]
17538        #[allow(unused_comparisons)]
17539        if __tmp.remaining() < Self::ENCODED_LEN {
17540            panic!(
17541                "buffer is too small (need {} bytes, but got {})",
17542                Self::ENCODED_LEN,
17543                __tmp.remaining(),
17544            )
17545        }
17546        __tmp.put_u64_le(self.timestamp);
17547        __tmp.put_u64_le(self.last_heartbeat);
17548        __tmp.put_u16_le(self.failed_sessions);
17549        __tmp.put_u16_le(self.successful_sessions);
17550        __tmp.put_u8(self.signal_quality);
17551        __tmp.put_u8(self.ring_pending);
17552        __tmp.put_u8(self.tx_session_pending);
17553        __tmp.put_u8(self.rx_session_pending);
17554        if matches!(version, MavlinkVersion::V2) {
17555            let len = __tmp.len();
17556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17557        } else {
17558            __tmp.len()
17559        }
17560    }
17561}
17562#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17563#[doc = ""]
17564#[doc = "ID: 149"]
17565#[derive(Debug, Clone, PartialEq)]
17566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17568#[cfg_attr(feature = "ts", derive(TS))]
17569#[cfg_attr(feature = "ts", ts(export))]
17570pub struct LANDING_TARGET_DATA {
17571    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17572    pub time_usec: u64,
17573    #[doc = "X-axis angular offset of the target from the center of the image"]
17574    pub angle_x: f32,
17575    #[doc = "Y-axis angular offset of the target from the center of the image"]
17576    pub angle_y: f32,
17577    #[doc = "Distance to the target from the vehicle"]
17578    pub distance: f32,
17579    #[doc = "Size of target along x-axis"]
17580    pub size_x: f32,
17581    #[doc = "Size of target along y-axis"]
17582    pub size_y: f32,
17583    #[doc = "The ID of the target if multiple targets are present"]
17584    pub target_num: u8,
17585    #[doc = "Coordinate frame used for following fields."]
17586    pub frame: MavFrame,
17587    #[doc = "X Position of the landing target in MAV_FRAME"]
17588    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17589    pub x: f32,
17590    #[doc = "Y Position of the landing target in MAV_FRAME"]
17591    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17592    pub y: f32,
17593    #[doc = "Z Position of the landing target in MAV_FRAME"]
17594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17595    pub z: f32,
17596    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17597    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17599    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17600    pub q: [f32; 4],
17601    #[doc = "Type of landing target"]
17602    #[cfg_attr(feature = "serde", serde(default))]
17603    pub mavtype: LandingTargetType,
17604    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17606    pub position_valid: u8,
17607}
17608impl LANDING_TARGET_DATA {
17609    pub const ENCODED_LEN: usize = 60usize;
17610    pub const DEFAULT: Self = Self {
17611        time_usec: 0_u64,
17612        angle_x: 0.0_f32,
17613        angle_y: 0.0_f32,
17614        distance: 0.0_f32,
17615        size_x: 0.0_f32,
17616        size_y: 0.0_f32,
17617        target_num: 0_u8,
17618        frame: MavFrame::DEFAULT,
17619        x: 0.0_f32,
17620        y: 0.0_f32,
17621        z: 0.0_f32,
17622        q: [0.0_f32; 4usize],
17623        mavtype: LandingTargetType::DEFAULT,
17624        position_valid: 0_u8,
17625    };
17626    #[cfg(feature = "arbitrary")]
17627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17628        use arbitrary::{Arbitrary, Unstructured};
17629        let mut buf = [0u8; 1024];
17630        rng.fill_bytes(&mut buf);
17631        let mut unstructured = Unstructured::new(&buf);
17632        Self::arbitrary(&mut unstructured).unwrap_or_default()
17633    }
17634}
17635impl Default for LANDING_TARGET_DATA {
17636    fn default() -> Self {
17637        Self::DEFAULT.clone()
17638    }
17639}
17640impl MessageData for LANDING_TARGET_DATA {
17641    type Message = MavMessage;
17642    const ID: u32 = 149u32;
17643    const NAME: &'static str = "LANDING_TARGET";
17644    const EXTRA_CRC: u8 = 200u8;
17645    const ENCODED_LEN: usize = 60usize;
17646    fn deser(
17647        _version: MavlinkVersion,
17648        __input: &[u8],
17649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17650        let avail_len = __input.len();
17651        let mut payload_buf = [0; Self::ENCODED_LEN];
17652        let mut buf = if avail_len < Self::ENCODED_LEN {
17653            payload_buf[0..avail_len].copy_from_slice(__input);
17654            Bytes::new(&payload_buf)
17655        } else {
17656            Bytes::new(__input)
17657        };
17658        let mut __struct = Self::default();
17659        __struct.time_usec = buf.get_u64_le();
17660        __struct.angle_x = buf.get_f32_le();
17661        __struct.angle_y = buf.get_f32_le();
17662        __struct.distance = buf.get_f32_le();
17663        __struct.size_x = buf.get_f32_le();
17664        __struct.size_y = buf.get_f32_le();
17665        __struct.target_num = buf.get_u8();
17666        let tmp = buf.get_u8();
17667        __struct.frame =
17668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17669                enum_type: "MavFrame",
17670                value: tmp as u32,
17671            })?;
17672        __struct.x = buf.get_f32_le();
17673        __struct.y = buf.get_f32_le();
17674        __struct.z = buf.get_f32_le();
17675        for v in &mut __struct.q {
17676            let val = buf.get_f32_le();
17677            *v = val;
17678        }
17679        let tmp = buf.get_u8();
17680        __struct.mavtype =
17681            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17682                enum_type: "LandingTargetType",
17683                value: tmp as u32,
17684            })?;
17685        __struct.position_valid = buf.get_u8();
17686        Ok(__struct)
17687    }
17688    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17689        let mut __tmp = BytesMut::new(bytes);
17690        #[allow(clippy::absurd_extreme_comparisons)]
17691        #[allow(unused_comparisons)]
17692        if __tmp.remaining() < Self::ENCODED_LEN {
17693            panic!(
17694                "buffer is too small (need {} bytes, but got {})",
17695                Self::ENCODED_LEN,
17696                __tmp.remaining(),
17697            )
17698        }
17699        __tmp.put_u64_le(self.time_usec);
17700        __tmp.put_f32_le(self.angle_x);
17701        __tmp.put_f32_le(self.angle_y);
17702        __tmp.put_f32_le(self.distance);
17703        __tmp.put_f32_le(self.size_x);
17704        __tmp.put_f32_le(self.size_y);
17705        __tmp.put_u8(self.target_num);
17706        __tmp.put_u8(self.frame as u8);
17707        if matches!(version, MavlinkVersion::V2) {
17708            __tmp.put_f32_le(self.x);
17709            __tmp.put_f32_le(self.y);
17710            __tmp.put_f32_le(self.z);
17711            for val in &self.q {
17712                __tmp.put_f32_le(*val);
17713            }
17714            __tmp.put_u8(self.mavtype as u8);
17715            __tmp.put_u8(self.position_valid);
17716            let len = __tmp.len();
17717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17718        } else {
17719            __tmp.len()
17720        }
17721    }
17722}
17723#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17724#[doc = ""]
17725#[doc = "ID: 8"]
17726#[derive(Debug, Clone, PartialEq)]
17727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17729#[cfg_attr(feature = "ts", derive(TS))]
17730#[cfg_attr(feature = "ts", ts(export))]
17731pub struct LINK_NODE_STATUS_DATA {
17732    #[doc = "Timestamp (time since system boot)."]
17733    pub timestamp: u64,
17734    #[doc = "Transmit rate"]
17735    pub tx_rate: u32,
17736    #[doc = "Receive rate"]
17737    pub rx_rate: u32,
17738    #[doc = "Messages sent"]
17739    pub messages_sent: u32,
17740    #[doc = "Messages received (estimated from counting seq)"]
17741    pub messages_received: u32,
17742    #[doc = "Messages lost (estimated from counting seq)"]
17743    pub messages_lost: u32,
17744    #[doc = "Number of bytes that could not be parsed correctly."]
17745    pub rx_parse_err: u16,
17746    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17747    pub tx_overflows: u16,
17748    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17749    pub rx_overflows: u16,
17750    #[doc = "Remaining free transmit buffer space"]
17751    pub tx_buf: u8,
17752    #[doc = "Remaining free receive buffer space"]
17753    pub rx_buf: u8,
17754}
17755impl LINK_NODE_STATUS_DATA {
17756    pub const ENCODED_LEN: usize = 36usize;
17757    pub const DEFAULT: Self = Self {
17758        timestamp: 0_u64,
17759        tx_rate: 0_u32,
17760        rx_rate: 0_u32,
17761        messages_sent: 0_u32,
17762        messages_received: 0_u32,
17763        messages_lost: 0_u32,
17764        rx_parse_err: 0_u16,
17765        tx_overflows: 0_u16,
17766        rx_overflows: 0_u16,
17767        tx_buf: 0_u8,
17768        rx_buf: 0_u8,
17769    };
17770    #[cfg(feature = "arbitrary")]
17771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17772        use arbitrary::{Arbitrary, Unstructured};
17773        let mut buf = [0u8; 1024];
17774        rng.fill_bytes(&mut buf);
17775        let mut unstructured = Unstructured::new(&buf);
17776        Self::arbitrary(&mut unstructured).unwrap_or_default()
17777    }
17778}
17779impl Default for LINK_NODE_STATUS_DATA {
17780    fn default() -> Self {
17781        Self::DEFAULT.clone()
17782    }
17783}
17784impl MessageData for LINK_NODE_STATUS_DATA {
17785    type Message = MavMessage;
17786    const ID: u32 = 8u32;
17787    const NAME: &'static str = "LINK_NODE_STATUS";
17788    const EXTRA_CRC: u8 = 117u8;
17789    const ENCODED_LEN: usize = 36usize;
17790    fn deser(
17791        _version: MavlinkVersion,
17792        __input: &[u8],
17793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17794        let avail_len = __input.len();
17795        let mut payload_buf = [0; Self::ENCODED_LEN];
17796        let mut buf = if avail_len < Self::ENCODED_LEN {
17797            payload_buf[0..avail_len].copy_from_slice(__input);
17798            Bytes::new(&payload_buf)
17799        } else {
17800            Bytes::new(__input)
17801        };
17802        let mut __struct = Self::default();
17803        __struct.timestamp = buf.get_u64_le();
17804        __struct.tx_rate = buf.get_u32_le();
17805        __struct.rx_rate = buf.get_u32_le();
17806        __struct.messages_sent = buf.get_u32_le();
17807        __struct.messages_received = buf.get_u32_le();
17808        __struct.messages_lost = buf.get_u32_le();
17809        __struct.rx_parse_err = buf.get_u16_le();
17810        __struct.tx_overflows = buf.get_u16_le();
17811        __struct.rx_overflows = buf.get_u16_le();
17812        __struct.tx_buf = buf.get_u8();
17813        __struct.rx_buf = buf.get_u8();
17814        Ok(__struct)
17815    }
17816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17817        let mut __tmp = BytesMut::new(bytes);
17818        #[allow(clippy::absurd_extreme_comparisons)]
17819        #[allow(unused_comparisons)]
17820        if __tmp.remaining() < Self::ENCODED_LEN {
17821            panic!(
17822                "buffer is too small (need {} bytes, but got {})",
17823                Self::ENCODED_LEN,
17824                __tmp.remaining(),
17825            )
17826        }
17827        __tmp.put_u64_le(self.timestamp);
17828        __tmp.put_u32_le(self.tx_rate);
17829        __tmp.put_u32_le(self.rx_rate);
17830        __tmp.put_u32_le(self.messages_sent);
17831        __tmp.put_u32_le(self.messages_received);
17832        __tmp.put_u32_le(self.messages_lost);
17833        __tmp.put_u16_le(self.rx_parse_err);
17834        __tmp.put_u16_le(self.tx_overflows);
17835        __tmp.put_u16_le(self.rx_overflows);
17836        __tmp.put_u8(self.tx_buf);
17837        __tmp.put_u8(self.rx_buf);
17838        if matches!(version, MavlinkVersion::V2) {
17839            let len = __tmp.len();
17840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17841        } else {
17842            __tmp.len()
17843        }
17844    }
17845}
17846#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17847#[doc = ""]
17848#[doc = "ID: 32"]
17849#[derive(Debug, Clone, PartialEq)]
17850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17852#[cfg_attr(feature = "ts", derive(TS))]
17853#[cfg_attr(feature = "ts", ts(export))]
17854pub struct LOCAL_POSITION_NED_DATA {
17855    #[doc = "Timestamp (time since system boot)."]
17856    pub time_boot_ms: u32,
17857    #[doc = "X Position"]
17858    pub x: f32,
17859    #[doc = "Y Position"]
17860    pub y: f32,
17861    #[doc = "Z Position"]
17862    pub z: f32,
17863    #[doc = "X Speed"]
17864    pub vx: f32,
17865    #[doc = "Y Speed"]
17866    pub vy: f32,
17867    #[doc = "Z Speed"]
17868    pub vz: f32,
17869}
17870impl LOCAL_POSITION_NED_DATA {
17871    pub const ENCODED_LEN: usize = 28usize;
17872    pub const DEFAULT: Self = Self {
17873        time_boot_ms: 0_u32,
17874        x: 0.0_f32,
17875        y: 0.0_f32,
17876        z: 0.0_f32,
17877        vx: 0.0_f32,
17878        vy: 0.0_f32,
17879        vz: 0.0_f32,
17880    };
17881    #[cfg(feature = "arbitrary")]
17882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17883        use arbitrary::{Arbitrary, Unstructured};
17884        let mut buf = [0u8; 1024];
17885        rng.fill_bytes(&mut buf);
17886        let mut unstructured = Unstructured::new(&buf);
17887        Self::arbitrary(&mut unstructured).unwrap_or_default()
17888    }
17889}
17890impl Default for LOCAL_POSITION_NED_DATA {
17891    fn default() -> Self {
17892        Self::DEFAULT.clone()
17893    }
17894}
17895impl MessageData for LOCAL_POSITION_NED_DATA {
17896    type Message = MavMessage;
17897    const ID: u32 = 32u32;
17898    const NAME: &'static str = "LOCAL_POSITION_NED";
17899    const EXTRA_CRC: u8 = 185u8;
17900    const ENCODED_LEN: usize = 28usize;
17901    fn deser(
17902        _version: MavlinkVersion,
17903        __input: &[u8],
17904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17905        let avail_len = __input.len();
17906        let mut payload_buf = [0; Self::ENCODED_LEN];
17907        let mut buf = if avail_len < Self::ENCODED_LEN {
17908            payload_buf[0..avail_len].copy_from_slice(__input);
17909            Bytes::new(&payload_buf)
17910        } else {
17911            Bytes::new(__input)
17912        };
17913        let mut __struct = Self::default();
17914        __struct.time_boot_ms = buf.get_u32_le();
17915        __struct.x = buf.get_f32_le();
17916        __struct.y = buf.get_f32_le();
17917        __struct.z = buf.get_f32_le();
17918        __struct.vx = buf.get_f32_le();
17919        __struct.vy = buf.get_f32_le();
17920        __struct.vz = buf.get_f32_le();
17921        Ok(__struct)
17922    }
17923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17924        let mut __tmp = BytesMut::new(bytes);
17925        #[allow(clippy::absurd_extreme_comparisons)]
17926        #[allow(unused_comparisons)]
17927        if __tmp.remaining() < Self::ENCODED_LEN {
17928            panic!(
17929                "buffer is too small (need {} bytes, but got {})",
17930                Self::ENCODED_LEN,
17931                __tmp.remaining(),
17932            )
17933        }
17934        __tmp.put_u32_le(self.time_boot_ms);
17935        __tmp.put_f32_le(self.x);
17936        __tmp.put_f32_le(self.y);
17937        __tmp.put_f32_le(self.z);
17938        __tmp.put_f32_le(self.vx);
17939        __tmp.put_f32_le(self.vy);
17940        __tmp.put_f32_le(self.vz);
17941        if matches!(version, MavlinkVersion::V2) {
17942            let len = __tmp.len();
17943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17944        } else {
17945            __tmp.len()
17946        }
17947    }
17948}
17949#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17950#[doc = ""]
17951#[doc = "ID: 64"]
17952#[derive(Debug, Clone, PartialEq)]
17953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17955#[cfg_attr(feature = "ts", derive(TS))]
17956#[cfg_attr(feature = "ts", ts(export))]
17957pub struct LOCAL_POSITION_NED_COV_DATA {
17958    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17959    pub time_usec: u64,
17960    #[doc = "X Position"]
17961    pub x: f32,
17962    #[doc = "Y Position"]
17963    pub y: f32,
17964    #[doc = "Z Position"]
17965    pub z: f32,
17966    #[doc = "X Speed"]
17967    pub vx: f32,
17968    #[doc = "Y Speed"]
17969    pub vy: f32,
17970    #[doc = "Z Speed"]
17971    pub vz: f32,
17972    #[doc = "X Acceleration"]
17973    pub ax: f32,
17974    #[doc = "Y Acceleration"]
17975    pub ay: f32,
17976    #[doc = "Z Acceleration"]
17977    pub az: f32,
17978    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17980    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17981    pub covariance: [f32; 45],
17982    #[doc = "Class id of the estimator this estimate originated from."]
17983    pub estimator_type: MavEstimatorType,
17984}
17985impl LOCAL_POSITION_NED_COV_DATA {
17986    pub const ENCODED_LEN: usize = 225usize;
17987    pub const DEFAULT: Self = Self {
17988        time_usec: 0_u64,
17989        x: 0.0_f32,
17990        y: 0.0_f32,
17991        z: 0.0_f32,
17992        vx: 0.0_f32,
17993        vy: 0.0_f32,
17994        vz: 0.0_f32,
17995        ax: 0.0_f32,
17996        ay: 0.0_f32,
17997        az: 0.0_f32,
17998        covariance: [0.0_f32; 45usize],
17999        estimator_type: MavEstimatorType::DEFAULT,
18000    };
18001    #[cfg(feature = "arbitrary")]
18002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18003        use arbitrary::{Arbitrary, Unstructured};
18004        let mut buf = [0u8; 1024];
18005        rng.fill_bytes(&mut buf);
18006        let mut unstructured = Unstructured::new(&buf);
18007        Self::arbitrary(&mut unstructured).unwrap_or_default()
18008    }
18009}
18010impl Default for LOCAL_POSITION_NED_COV_DATA {
18011    fn default() -> Self {
18012        Self::DEFAULT.clone()
18013    }
18014}
18015impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18016    type Message = MavMessage;
18017    const ID: u32 = 64u32;
18018    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18019    const EXTRA_CRC: u8 = 191u8;
18020    const ENCODED_LEN: usize = 225usize;
18021    fn deser(
18022        _version: MavlinkVersion,
18023        __input: &[u8],
18024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18025        let avail_len = __input.len();
18026        let mut payload_buf = [0; Self::ENCODED_LEN];
18027        let mut buf = if avail_len < Self::ENCODED_LEN {
18028            payload_buf[0..avail_len].copy_from_slice(__input);
18029            Bytes::new(&payload_buf)
18030        } else {
18031            Bytes::new(__input)
18032        };
18033        let mut __struct = Self::default();
18034        __struct.time_usec = buf.get_u64_le();
18035        __struct.x = buf.get_f32_le();
18036        __struct.y = buf.get_f32_le();
18037        __struct.z = buf.get_f32_le();
18038        __struct.vx = buf.get_f32_le();
18039        __struct.vy = buf.get_f32_le();
18040        __struct.vz = buf.get_f32_le();
18041        __struct.ax = buf.get_f32_le();
18042        __struct.ay = buf.get_f32_le();
18043        __struct.az = buf.get_f32_le();
18044        for v in &mut __struct.covariance {
18045            let val = buf.get_f32_le();
18046            *v = val;
18047        }
18048        let tmp = buf.get_u8();
18049        __struct.estimator_type =
18050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18051                enum_type: "MavEstimatorType",
18052                value: tmp as u32,
18053            })?;
18054        Ok(__struct)
18055    }
18056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18057        let mut __tmp = BytesMut::new(bytes);
18058        #[allow(clippy::absurd_extreme_comparisons)]
18059        #[allow(unused_comparisons)]
18060        if __tmp.remaining() < Self::ENCODED_LEN {
18061            panic!(
18062                "buffer is too small (need {} bytes, but got {})",
18063                Self::ENCODED_LEN,
18064                __tmp.remaining(),
18065            )
18066        }
18067        __tmp.put_u64_le(self.time_usec);
18068        __tmp.put_f32_le(self.x);
18069        __tmp.put_f32_le(self.y);
18070        __tmp.put_f32_le(self.z);
18071        __tmp.put_f32_le(self.vx);
18072        __tmp.put_f32_le(self.vy);
18073        __tmp.put_f32_le(self.vz);
18074        __tmp.put_f32_le(self.ax);
18075        __tmp.put_f32_le(self.ay);
18076        __tmp.put_f32_le(self.az);
18077        for val in &self.covariance {
18078            __tmp.put_f32_le(*val);
18079        }
18080        __tmp.put_u8(self.estimator_type as u8);
18081        if matches!(version, MavlinkVersion::V2) {
18082            let len = __tmp.len();
18083            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18084        } else {
18085            __tmp.len()
18086        }
18087    }
18088}
18089#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18090#[doc = ""]
18091#[doc = "ID: 89"]
18092#[derive(Debug, Clone, PartialEq)]
18093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18095#[cfg_attr(feature = "ts", derive(TS))]
18096#[cfg_attr(feature = "ts", ts(export))]
18097pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18098    #[doc = "Timestamp (time since system boot)."]
18099    pub time_boot_ms: u32,
18100    #[doc = "X Position"]
18101    pub x: f32,
18102    #[doc = "Y Position"]
18103    pub y: f32,
18104    #[doc = "Z Position"]
18105    pub z: f32,
18106    #[doc = "Roll"]
18107    pub roll: f32,
18108    #[doc = "Pitch"]
18109    pub pitch: f32,
18110    #[doc = "Yaw"]
18111    pub yaw: f32,
18112}
18113impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18114    pub const ENCODED_LEN: usize = 28usize;
18115    pub const DEFAULT: Self = Self {
18116        time_boot_ms: 0_u32,
18117        x: 0.0_f32,
18118        y: 0.0_f32,
18119        z: 0.0_f32,
18120        roll: 0.0_f32,
18121        pitch: 0.0_f32,
18122        yaw: 0.0_f32,
18123    };
18124    #[cfg(feature = "arbitrary")]
18125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18126        use arbitrary::{Arbitrary, Unstructured};
18127        let mut buf = [0u8; 1024];
18128        rng.fill_bytes(&mut buf);
18129        let mut unstructured = Unstructured::new(&buf);
18130        Self::arbitrary(&mut unstructured).unwrap_or_default()
18131    }
18132}
18133impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18134    fn default() -> Self {
18135        Self::DEFAULT.clone()
18136    }
18137}
18138impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18139    type Message = MavMessage;
18140    const ID: u32 = 89u32;
18141    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18142    const EXTRA_CRC: u8 = 231u8;
18143    const ENCODED_LEN: usize = 28usize;
18144    fn deser(
18145        _version: MavlinkVersion,
18146        __input: &[u8],
18147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18148        let avail_len = __input.len();
18149        let mut payload_buf = [0; Self::ENCODED_LEN];
18150        let mut buf = if avail_len < Self::ENCODED_LEN {
18151            payload_buf[0..avail_len].copy_from_slice(__input);
18152            Bytes::new(&payload_buf)
18153        } else {
18154            Bytes::new(__input)
18155        };
18156        let mut __struct = Self::default();
18157        __struct.time_boot_ms = buf.get_u32_le();
18158        __struct.x = buf.get_f32_le();
18159        __struct.y = buf.get_f32_le();
18160        __struct.z = buf.get_f32_le();
18161        __struct.roll = buf.get_f32_le();
18162        __struct.pitch = buf.get_f32_le();
18163        __struct.yaw = buf.get_f32_le();
18164        Ok(__struct)
18165    }
18166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18167        let mut __tmp = BytesMut::new(bytes);
18168        #[allow(clippy::absurd_extreme_comparisons)]
18169        #[allow(unused_comparisons)]
18170        if __tmp.remaining() < Self::ENCODED_LEN {
18171            panic!(
18172                "buffer is too small (need {} bytes, but got {})",
18173                Self::ENCODED_LEN,
18174                __tmp.remaining(),
18175            )
18176        }
18177        __tmp.put_u32_le(self.time_boot_ms);
18178        __tmp.put_f32_le(self.x);
18179        __tmp.put_f32_le(self.y);
18180        __tmp.put_f32_le(self.z);
18181        __tmp.put_f32_le(self.roll);
18182        __tmp.put_f32_le(self.pitch);
18183        __tmp.put_f32_le(self.yaw);
18184        if matches!(version, MavlinkVersion::V2) {
18185            let len = __tmp.len();
18186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18187        } else {
18188            __tmp.len()
18189        }
18190    }
18191}
18192#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18193#[doc = ""]
18194#[doc = "ID: 268"]
18195#[derive(Debug, Clone, PartialEq)]
18196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18198#[cfg_attr(feature = "ts", derive(TS))]
18199#[cfg_attr(feature = "ts", ts(export))]
18200pub struct LOGGING_ACK_DATA {
18201    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18202    pub sequence: u16,
18203    #[doc = "system ID of the target"]
18204    pub target_system: u8,
18205    #[doc = "component ID of the target"]
18206    pub target_component: u8,
18207}
18208impl LOGGING_ACK_DATA {
18209    pub const ENCODED_LEN: usize = 4usize;
18210    pub const DEFAULT: Self = Self {
18211        sequence: 0_u16,
18212        target_system: 0_u8,
18213        target_component: 0_u8,
18214    };
18215    #[cfg(feature = "arbitrary")]
18216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18217        use arbitrary::{Arbitrary, Unstructured};
18218        let mut buf = [0u8; 1024];
18219        rng.fill_bytes(&mut buf);
18220        let mut unstructured = Unstructured::new(&buf);
18221        Self::arbitrary(&mut unstructured).unwrap_or_default()
18222    }
18223}
18224impl Default for LOGGING_ACK_DATA {
18225    fn default() -> Self {
18226        Self::DEFAULT.clone()
18227    }
18228}
18229impl MessageData for LOGGING_ACK_DATA {
18230    type Message = MavMessage;
18231    const ID: u32 = 268u32;
18232    const NAME: &'static str = "LOGGING_ACK";
18233    const EXTRA_CRC: u8 = 14u8;
18234    const ENCODED_LEN: usize = 4usize;
18235    fn deser(
18236        _version: MavlinkVersion,
18237        __input: &[u8],
18238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18239        let avail_len = __input.len();
18240        let mut payload_buf = [0; Self::ENCODED_LEN];
18241        let mut buf = if avail_len < Self::ENCODED_LEN {
18242            payload_buf[0..avail_len].copy_from_slice(__input);
18243            Bytes::new(&payload_buf)
18244        } else {
18245            Bytes::new(__input)
18246        };
18247        let mut __struct = Self::default();
18248        __struct.sequence = buf.get_u16_le();
18249        __struct.target_system = buf.get_u8();
18250        __struct.target_component = buf.get_u8();
18251        Ok(__struct)
18252    }
18253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18254        let mut __tmp = BytesMut::new(bytes);
18255        #[allow(clippy::absurd_extreme_comparisons)]
18256        #[allow(unused_comparisons)]
18257        if __tmp.remaining() < Self::ENCODED_LEN {
18258            panic!(
18259                "buffer is too small (need {} bytes, but got {})",
18260                Self::ENCODED_LEN,
18261                __tmp.remaining(),
18262            )
18263        }
18264        __tmp.put_u16_le(self.sequence);
18265        __tmp.put_u8(self.target_system);
18266        __tmp.put_u8(self.target_component);
18267        if matches!(version, MavlinkVersion::V2) {
18268            let len = __tmp.len();
18269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18270        } else {
18271            __tmp.len()
18272        }
18273    }
18274}
18275#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18276#[doc = ""]
18277#[doc = "ID: 266"]
18278#[derive(Debug, Clone, PartialEq)]
18279#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18281#[cfg_attr(feature = "ts", derive(TS))]
18282#[cfg_attr(feature = "ts", ts(export))]
18283pub struct LOGGING_DATA_DATA {
18284    #[doc = "sequence number (can wrap)"]
18285    pub sequence: u16,
18286    #[doc = "system ID of the target"]
18287    pub target_system: u8,
18288    #[doc = "component ID of the target"]
18289    pub target_component: u8,
18290    #[doc = "data length"]
18291    pub length: u8,
18292    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18293    pub first_message_offset: u8,
18294    #[doc = "logged data"]
18295    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18296    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18297    pub data: [u8; 249],
18298}
18299impl LOGGING_DATA_DATA {
18300    pub const ENCODED_LEN: usize = 255usize;
18301    pub const DEFAULT: Self = Self {
18302        sequence: 0_u16,
18303        target_system: 0_u8,
18304        target_component: 0_u8,
18305        length: 0_u8,
18306        first_message_offset: 0_u8,
18307        data: [0_u8; 249usize],
18308    };
18309    #[cfg(feature = "arbitrary")]
18310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18311        use arbitrary::{Arbitrary, Unstructured};
18312        let mut buf = [0u8; 1024];
18313        rng.fill_bytes(&mut buf);
18314        let mut unstructured = Unstructured::new(&buf);
18315        Self::arbitrary(&mut unstructured).unwrap_or_default()
18316    }
18317}
18318impl Default for LOGGING_DATA_DATA {
18319    fn default() -> Self {
18320        Self::DEFAULT.clone()
18321    }
18322}
18323impl MessageData for LOGGING_DATA_DATA {
18324    type Message = MavMessage;
18325    const ID: u32 = 266u32;
18326    const NAME: &'static str = "LOGGING_DATA";
18327    const EXTRA_CRC: u8 = 193u8;
18328    const ENCODED_LEN: usize = 255usize;
18329    fn deser(
18330        _version: MavlinkVersion,
18331        __input: &[u8],
18332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18333        let avail_len = __input.len();
18334        let mut payload_buf = [0; Self::ENCODED_LEN];
18335        let mut buf = if avail_len < Self::ENCODED_LEN {
18336            payload_buf[0..avail_len].copy_from_slice(__input);
18337            Bytes::new(&payload_buf)
18338        } else {
18339            Bytes::new(__input)
18340        };
18341        let mut __struct = Self::default();
18342        __struct.sequence = buf.get_u16_le();
18343        __struct.target_system = buf.get_u8();
18344        __struct.target_component = buf.get_u8();
18345        __struct.length = buf.get_u8();
18346        __struct.first_message_offset = buf.get_u8();
18347        for v in &mut __struct.data {
18348            let val = buf.get_u8();
18349            *v = val;
18350        }
18351        Ok(__struct)
18352    }
18353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18354        let mut __tmp = BytesMut::new(bytes);
18355        #[allow(clippy::absurd_extreme_comparisons)]
18356        #[allow(unused_comparisons)]
18357        if __tmp.remaining() < Self::ENCODED_LEN {
18358            panic!(
18359                "buffer is too small (need {} bytes, but got {})",
18360                Self::ENCODED_LEN,
18361                __tmp.remaining(),
18362            )
18363        }
18364        __tmp.put_u16_le(self.sequence);
18365        __tmp.put_u8(self.target_system);
18366        __tmp.put_u8(self.target_component);
18367        __tmp.put_u8(self.length);
18368        __tmp.put_u8(self.first_message_offset);
18369        for val in &self.data {
18370            __tmp.put_u8(*val);
18371        }
18372        if matches!(version, MavlinkVersion::V2) {
18373            let len = __tmp.len();
18374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18375        } else {
18376            __tmp.len()
18377        }
18378    }
18379}
18380#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18381#[doc = ""]
18382#[doc = "ID: 267"]
18383#[derive(Debug, Clone, PartialEq)]
18384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18386#[cfg_attr(feature = "ts", derive(TS))]
18387#[cfg_attr(feature = "ts", ts(export))]
18388pub struct LOGGING_DATA_ACKED_DATA {
18389    #[doc = "sequence number (can wrap)"]
18390    pub sequence: u16,
18391    #[doc = "system ID of the target"]
18392    pub target_system: u8,
18393    #[doc = "component ID of the target"]
18394    pub target_component: u8,
18395    #[doc = "data length"]
18396    pub length: u8,
18397    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18398    pub first_message_offset: u8,
18399    #[doc = "logged data"]
18400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18401    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18402    pub data: [u8; 249],
18403}
18404impl LOGGING_DATA_ACKED_DATA {
18405    pub const ENCODED_LEN: usize = 255usize;
18406    pub const DEFAULT: Self = Self {
18407        sequence: 0_u16,
18408        target_system: 0_u8,
18409        target_component: 0_u8,
18410        length: 0_u8,
18411        first_message_offset: 0_u8,
18412        data: [0_u8; 249usize],
18413    };
18414    #[cfg(feature = "arbitrary")]
18415    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18416        use arbitrary::{Arbitrary, Unstructured};
18417        let mut buf = [0u8; 1024];
18418        rng.fill_bytes(&mut buf);
18419        let mut unstructured = Unstructured::new(&buf);
18420        Self::arbitrary(&mut unstructured).unwrap_or_default()
18421    }
18422}
18423impl Default for LOGGING_DATA_ACKED_DATA {
18424    fn default() -> Self {
18425        Self::DEFAULT.clone()
18426    }
18427}
18428impl MessageData for LOGGING_DATA_ACKED_DATA {
18429    type Message = MavMessage;
18430    const ID: u32 = 267u32;
18431    const NAME: &'static str = "LOGGING_DATA_ACKED";
18432    const EXTRA_CRC: u8 = 35u8;
18433    const ENCODED_LEN: usize = 255usize;
18434    fn deser(
18435        _version: MavlinkVersion,
18436        __input: &[u8],
18437    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18438        let avail_len = __input.len();
18439        let mut payload_buf = [0; Self::ENCODED_LEN];
18440        let mut buf = if avail_len < Self::ENCODED_LEN {
18441            payload_buf[0..avail_len].copy_from_slice(__input);
18442            Bytes::new(&payload_buf)
18443        } else {
18444            Bytes::new(__input)
18445        };
18446        let mut __struct = Self::default();
18447        __struct.sequence = buf.get_u16_le();
18448        __struct.target_system = buf.get_u8();
18449        __struct.target_component = buf.get_u8();
18450        __struct.length = buf.get_u8();
18451        __struct.first_message_offset = buf.get_u8();
18452        for v in &mut __struct.data {
18453            let val = buf.get_u8();
18454            *v = val;
18455        }
18456        Ok(__struct)
18457    }
18458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18459        let mut __tmp = BytesMut::new(bytes);
18460        #[allow(clippy::absurd_extreme_comparisons)]
18461        #[allow(unused_comparisons)]
18462        if __tmp.remaining() < Self::ENCODED_LEN {
18463            panic!(
18464                "buffer is too small (need {} bytes, but got {})",
18465                Self::ENCODED_LEN,
18466                __tmp.remaining(),
18467            )
18468        }
18469        __tmp.put_u16_le(self.sequence);
18470        __tmp.put_u8(self.target_system);
18471        __tmp.put_u8(self.target_component);
18472        __tmp.put_u8(self.length);
18473        __tmp.put_u8(self.first_message_offset);
18474        for val in &self.data {
18475            __tmp.put_u8(*val);
18476        }
18477        if matches!(version, MavlinkVersion::V2) {
18478            let len = __tmp.len();
18479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18480        } else {
18481            __tmp.len()
18482        }
18483    }
18484}
18485#[doc = "Reply to LOG_REQUEST_DATA."]
18486#[doc = ""]
18487#[doc = "ID: 120"]
18488#[derive(Debug, Clone, PartialEq)]
18489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18491#[cfg_attr(feature = "ts", derive(TS))]
18492#[cfg_attr(feature = "ts", ts(export))]
18493pub struct LOG_DATA_DATA {
18494    #[doc = "Offset into the log"]
18495    pub ofs: u32,
18496    #[doc = "Log id (from LOG_ENTRY reply)"]
18497    pub id: u16,
18498    #[doc = "Number of bytes (zero for end of log)"]
18499    pub count: u8,
18500    #[doc = "log data"]
18501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18502    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18503    pub data: [u8; 90],
18504}
18505impl LOG_DATA_DATA {
18506    pub const ENCODED_LEN: usize = 97usize;
18507    pub const DEFAULT: Self = Self {
18508        ofs: 0_u32,
18509        id: 0_u16,
18510        count: 0_u8,
18511        data: [0_u8; 90usize],
18512    };
18513    #[cfg(feature = "arbitrary")]
18514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18515        use arbitrary::{Arbitrary, Unstructured};
18516        let mut buf = [0u8; 1024];
18517        rng.fill_bytes(&mut buf);
18518        let mut unstructured = Unstructured::new(&buf);
18519        Self::arbitrary(&mut unstructured).unwrap_or_default()
18520    }
18521}
18522impl Default for LOG_DATA_DATA {
18523    fn default() -> Self {
18524        Self::DEFAULT.clone()
18525    }
18526}
18527impl MessageData for LOG_DATA_DATA {
18528    type Message = MavMessage;
18529    const ID: u32 = 120u32;
18530    const NAME: &'static str = "LOG_DATA";
18531    const EXTRA_CRC: u8 = 134u8;
18532    const ENCODED_LEN: usize = 97usize;
18533    fn deser(
18534        _version: MavlinkVersion,
18535        __input: &[u8],
18536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18537        let avail_len = __input.len();
18538        let mut payload_buf = [0; Self::ENCODED_LEN];
18539        let mut buf = if avail_len < Self::ENCODED_LEN {
18540            payload_buf[0..avail_len].copy_from_slice(__input);
18541            Bytes::new(&payload_buf)
18542        } else {
18543            Bytes::new(__input)
18544        };
18545        let mut __struct = Self::default();
18546        __struct.ofs = buf.get_u32_le();
18547        __struct.id = buf.get_u16_le();
18548        __struct.count = buf.get_u8();
18549        for v in &mut __struct.data {
18550            let val = buf.get_u8();
18551            *v = val;
18552        }
18553        Ok(__struct)
18554    }
18555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18556        let mut __tmp = BytesMut::new(bytes);
18557        #[allow(clippy::absurd_extreme_comparisons)]
18558        #[allow(unused_comparisons)]
18559        if __tmp.remaining() < Self::ENCODED_LEN {
18560            panic!(
18561                "buffer is too small (need {} bytes, but got {})",
18562                Self::ENCODED_LEN,
18563                __tmp.remaining(),
18564            )
18565        }
18566        __tmp.put_u32_le(self.ofs);
18567        __tmp.put_u16_le(self.id);
18568        __tmp.put_u8(self.count);
18569        for val in &self.data {
18570            __tmp.put_u8(*val);
18571        }
18572        if matches!(version, MavlinkVersion::V2) {
18573            let len = __tmp.len();
18574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18575        } else {
18576            __tmp.len()
18577        }
18578    }
18579}
18580#[doc = "Reply to LOG_REQUEST_LIST."]
18581#[doc = ""]
18582#[doc = "ID: 118"]
18583#[derive(Debug, Clone, PartialEq)]
18584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18586#[cfg_attr(feature = "ts", derive(TS))]
18587#[cfg_attr(feature = "ts", ts(export))]
18588pub struct LOG_ENTRY_DATA {
18589    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18590    pub time_utc: u32,
18591    #[doc = "Size of the log (may be approximate)"]
18592    pub size: u32,
18593    #[doc = "Log id"]
18594    pub id: u16,
18595    #[doc = "Total number of logs"]
18596    pub num_logs: u16,
18597    #[doc = "High log number"]
18598    pub last_log_num: u16,
18599}
18600impl LOG_ENTRY_DATA {
18601    pub const ENCODED_LEN: usize = 14usize;
18602    pub const DEFAULT: Self = Self {
18603        time_utc: 0_u32,
18604        size: 0_u32,
18605        id: 0_u16,
18606        num_logs: 0_u16,
18607        last_log_num: 0_u16,
18608    };
18609    #[cfg(feature = "arbitrary")]
18610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18611        use arbitrary::{Arbitrary, Unstructured};
18612        let mut buf = [0u8; 1024];
18613        rng.fill_bytes(&mut buf);
18614        let mut unstructured = Unstructured::new(&buf);
18615        Self::arbitrary(&mut unstructured).unwrap_or_default()
18616    }
18617}
18618impl Default for LOG_ENTRY_DATA {
18619    fn default() -> Self {
18620        Self::DEFAULT.clone()
18621    }
18622}
18623impl MessageData for LOG_ENTRY_DATA {
18624    type Message = MavMessage;
18625    const ID: u32 = 118u32;
18626    const NAME: &'static str = "LOG_ENTRY";
18627    const EXTRA_CRC: u8 = 56u8;
18628    const ENCODED_LEN: usize = 14usize;
18629    fn deser(
18630        _version: MavlinkVersion,
18631        __input: &[u8],
18632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18633        let avail_len = __input.len();
18634        let mut payload_buf = [0; Self::ENCODED_LEN];
18635        let mut buf = if avail_len < Self::ENCODED_LEN {
18636            payload_buf[0..avail_len].copy_from_slice(__input);
18637            Bytes::new(&payload_buf)
18638        } else {
18639            Bytes::new(__input)
18640        };
18641        let mut __struct = Self::default();
18642        __struct.time_utc = buf.get_u32_le();
18643        __struct.size = buf.get_u32_le();
18644        __struct.id = buf.get_u16_le();
18645        __struct.num_logs = buf.get_u16_le();
18646        __struct.last_log_num = buf.get_u16_le();
18647        Ok(__struct)
18648    }
18649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18650        let mut __tmp = BytesMut::new(bytes);
18651        #[allow(clippy::absurd_extreme_comparisons)]
18652        #[allow(unused_comparisons)]
18653        if __tmp.remaining() < Self::ENCODED_LEN {
18654            panic!(
18655                "buffer is too small (need {} bytes, but got {})",
18656                Self::ENCODED_LEN,
18657                __tmp.remaining(),
18658            )
18659        }
18660        __tmp.put_u32_le(self.time_utc);
18661        __tmp.put_u32_le(self.size);
18662        __tmp.put_u16_le(self.id);
18663        __tmp.put_u16_le(self.num_logs);
18664        __tmp.put_u16_le(self.last_log_num);
18665        if matches!(version, MavlinkVersion::V2) {
18666            let len = __tmp.len();
18667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18668        } else {
18669            __tmp.len()
18670        }
18671    }
18672}
18673#[doc = "Erase all logs."]
18674#[doc = ""]
18675#[doc = "ID: 121"]
18676#[derive(Debug, Clone, PartialEq)]
18677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18679#[cfg_attr(feature = "ts", derive(TS))]
18680#[cfg_attr(feature = "ts", ts(export))]
18681pub struct LOG_ERASE_DATA {
18682    #[doc = "System ID"]
18683    pub target_system: u8,
18684    #[doc = "Component ID"]
18685    pub target_component: u8,
18686}
18687impl LOG_ERASE_DATA {
18688    pub const ENCODED_LEN: usize = 2usize;
18689    pub const DEFAULT: Self = Self {
18690        target_system: 0_u8,
18691        target_component: 0_u8,
18692    };
18693    #[cfg(feature = "arbitrary")]
18694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18695        use arbitrary::{Arbitrary, Unstructured};
18696        let mut buf = [0u8; 1024];
18697        rng.fill_bytes(&mut buf);
18698        let mut unstructured = Unstructured::new(&buf);
18699        Self::arbitrary(&mut unstructured).unwrap_or_default()
18700    }
18701}
18702impl Default for LOG_ERASE_DATA {
18703    fn default() -> Self {
18704        Self::DEFAULT.clone()
18705    }
18706}
18707impl MessageData for LOG_ERASE_DATA {
18708    type Message = MavMessage;
18709    const ID: u32 = 121u32;
18710    const NAME: &'static str = "LOG_ERASE";
18711    const EXTRA_CRC: u8 = 237u8;
18712    const ENCODED_LEN: usize = 2usize;
18713    fn deser(
18714        _version: MavlinkVersion,
18715        __input: &[u8],
18716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18717        let avail_len = __input.len();
18718        let mut payload_buf = [0; Self::ENCODED_LEN];
18719        let mut buf = if avail_len < Self::ENCODED_LEN {
18720            payload_buf[0..avail_len].copy_from_slice(__input);
18721            Bytes::new(&payload_buf)
18722        } else {
18723            Bytes::new(__input)
18724        };
18725        let mut __struct = Self::default();
18726        __struct.target_system = buf.get_u8();
18727        __struct.target_component = buf.get_u8();
18728        Ok(__struct)
18729    }
18730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18731        let mut __tmp = BytesMut::new(bytes);
18732        #[allow(clippy::absurd_extreme_comparisons)]
18733        #[allow(unused_comparisons)]
18734        if __tmp.remaining() < Self::ENCODED_LEN {
18735            panic!(
18736                "buffer is too small (need {} bytes, but got {})",
18737                Self::ENCODED_LEN,
18738                __tmp.remaining(),
18739            )
18740        }
18741        __tmp.put_u8(self.target_system);
18742        __tmp.put_u8(self.target_component);
18743        if matches!(version, MavlinkVersion::V2) {
18744            let len = __tmp.len();
18745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18746        } else {
18747            __tmp.len()
18748        }
18749    }
18750}
18751#[doc = "Request a chunk of a log."]
18752#[doc = ""]
18753#[doc = "ID: 119"]
18754#[derive(Debug, Clone, PartialEq)]
18755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18757#[cfg_attr(feature = "ts", derive(TS))]
18758#[cfg_attr(feature = "ts", ts(export))]
18759pub struct LOG_REQUEST_DATA_DATA {
18760    #[doc = "Offset into the log"]
18761    pub ofs: u32,
18762    #[doc = "Number of bytes"]
18763    pub count: u32,
18764    #[doc = "Log id (from LOG_ENTRY reply)"]
18765    pub id: u16,
18766    #[doc = "System ID"]
18767    pub target_system: u8,
18768    #[doc = "Component ID"]
18769    pub target_component: u8,
18770}
18771impl LOG_REQUEST_DATA_DATA {
18772    pub const ENCODED_LEN: usize = 12usize;
18773    pub const DEFAULT: Self = Self {
18774        ofs: 0_u32,
18775        count: 0_u32,
18776        id: 0_u16,
18777        target_system: 0_u8,
18778        target_component: 0_u8,
18779    };
18780    #[cfg(feature = "arbitrary")]
18781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18782        use arbitrary::{Arbitrary, Unstructured};
18783        let mut buf = [0u8; 1024];
18784        rng.fill_bytes(&mut buf);
18785        let mut unstructured = Unstructured::new(&buf);
18786        Self::arbitrary(&mut unstructured).unwrap_or_default()
18787    }
18788}
18789impl Default for LOG_REQUEST_DATA_DATA {
18790    fn default() -> Self {
18791        Self::DEFAULT.clone()
18792    }
18793}
18794impl MessageData for LOG_REQUEST_DATA_DATA {
18795    type Message = MavMessage;
18796    const ID: u32 = 119u32;
18797    const NAME: &'static str = "LOG_REQUEST_DATA";
18798    const EXTRA_CRC: u8 = 116u8;
18799    const ENCODED_LEN: usize = 12usize;
18800    fn deser(
18801        _version: MavlinkVersion,
18802        __input: &[u8],
18803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18804        let avail_len = __input.len();
18805        let mut payload_buf = [0; Self::ENCODED_LEN];
18806        let mut buf = if avail_len < Self::ENCODED_LEN {
18807            payload_buf[0..avail_len].copy_from_slice(__input);
18808            Bytes::new(&payload_buf)
18809        } else {
18810            Bytes::new(__input)
18811        };
18812        let mut __struct = Self::default();
18813        __struct.ofs = buf.get_u32_le();
18814        __struct.count = buf.get_u32_le();
18815        __struct.id = buf.get_u16_le();
18816        __struct.target_system = buf.get_u8();
18817        __struct.target_component = buf.get_u8();
18818        Ok(__struct)
18819    }
18820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18821        let mut __tmp = BytesMut::new(bytes);
18822        #[allow(clippy::absurd_extreme_comparisons)]
18823        #[allow(unused_comparisons)]
18824        if __tmp.remaining() < Self::ENCODED_LEN {
18825            panic!(
18826                "buffer is too small (need {} bytes, but got {})",
18827                Self::ENCODED_LEN,
18828                __tmp.remaining(),
18829            )
18830        }
18831        __tmp.put_u32_le(self.ofs);
18832        __tmp.put_u32_le(self.count);
18833        __tmp.put_u16_le(self.id);
18834        __tmp.put_u8(self.target_system);
18835        __tmp.put_u8(self.target_component);
18836        if matches!(version, MavlinkVersion::V2) {
18837            let len = __tmp.len();
18838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18839        } else {
18840            __tmp.len()
18841        }
18842    }
18843}
18844#[doc = "Stop log transfer and resume normal logging."]
18845#[doc = ""]
18846#[doc = "ID: 122"]
18847#[derive(Debug, Clone, PartialEq)]
18848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18850#[cfg_attr(feature = "ts", derive(TS))]
18851#[cfg_attr(feature = "ts", ts(export))]
18852pub struct LOG_REQUEST_END_DATA {
18853    #[doc = "System ID"]
18854    pub target_system: u8,
18855    #[doc = "Component ID"]
18856    pub target_component: u8,
18857}
18858impl LOG_REQUEST_END_DATA {
18859    pub const ENCODED_LEN: usize = 2usize;
18860    pub const DEFAULT: Self = Self {
18861        target_system: 0_u8,
18862        target_component: 0_u8,
18863    };
18864    #[cfg(feature = "arbitrary")]
18865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18866        use arbitrary::{Arbitrary, Unstructured};
18867        let mut buf = [0u8; 1024];
18868        rng.fill_bytes(&mut buf);
18869        let mut unstructured = Unstructured::new(&buf);
18870        Self::arbitrary(&mut unstructured).unwrap_or_default()
18871    }
18872}
18873impl Default for LOG_REQUEST_END_DATA {
18874    fn default() -> Self {
18875        Self::DEFAULT.clone()
18876    }
18877}
18878impl MessageData for LOG_REQUEST_END_DATA {
18879    type Message = MavMessage;
18880    const ID: u32 = 122u32;
18881    const NAME: &'static str = "LOG_REQUEST_END";
18882    const EXTRA_CRC: u8 = 203u8;
18883    const ENCODED_LEN: usize = 2usize;
18884    fn deser(
18885        _version: MavlinkVersion,
18886        __input: &[u8],
18887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18888        let avail_len = __input.len();
18889        let mut payload_buf = [0; Self::ENCODED_LEN];
18890        let mut buf = if avail_len < Self::ENCODED_LEN {
18891            payload_buf[0..avail_len].copy_from_slice(__input);
18892            Bytes::new(&payload_buf)
18893        } else {
18894            Bytes::new(__input)
18895        };
18896        let mut __struct = Self::default();
18897        __struct.target_system = buf.get_u8();
18898        __struct.target_component = buf.get_u8();
18899        Ok(__struct)
18900    }
18901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18902        let mut __tmp = BytesMut::new(bytes);
18903        #[allow(clippy::absurd_extreme_comparisons)]
18904        #[allow(unused_comparisons)]
18905        if __tmp.remaining() < Self::ENCODED_LEN {
18906            panic!(
18907                "buffer is too small (need {} bytes, but got {})",
18908                Self::ENCODED_LEN,
18909                __tmp.remaining(),
18910            )
18911        }
18912        __tmp.put_u8(self.target_system);
18913        __tmp.put_u8(self.target_component);
18914        if matches!(version, MavlinkVersion::V2) {
18915            let len = __tmp.len();
18916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18917        } else {
18918            __tmp.len()
18919        }
18920    }
18921}
18922#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18923#[doc = ""]
18924#[doc = "ID: 117"]
18925#[derive(Debug, Clone, PartialEq)]
18926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18928#[cfg_attr(feature = "ts", derive(TS))]
18929#[cfg_attr(feature = "ts", ts(export))]
18930pub struct LOG_REQUEST_LIST_DATA {
18931    #[doc = "First log id (0 for first available)"]
18932    pub start: u16,
18933    #[doc = "Last log id (0xffff for last available)"]
18934    pub end: u16,
18935    #[doc = "System ID"]
18936    pub target_system: u8,
18937    #[doc = "Component ID"]
18938    pub target_component: u8,
18939}
18940impl LOG_REQUEST_LIST_DATA {
18941    pub const ENCODED_LEN: usize = 6usize;
18942    pub const DEFAULT: Self = Self {
18943        start: 0_u16,
18944        end: 0_u16,
18945        target_system: 0_u8,
18946        target_component: 0_u8,
18947    };
18948    #[cfg(feature = "arbitrary")]
18949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18950        use arbitrary::{Arbitrary, Unstructured};
18951        let mut buf = [0u8; 1024];
18952        rng.fill_bytes(&mut buf);
18953        let mut unstructured = Unstructured::new(&buf);
18954        Self::arbitrary(&mut unstructured).unwrap_or_default()
18955    }
18956}
18957impl Default for LOG_REQUEST_LIST_DATA {
18958    fn default() -> Self {
18959        Self::DEFAULT.clone()
18960    }
18961}
18962impl MessageData for LOG_REQUEST_LIST_DATA {
18963    type Message = MavMessage;
18964    const ID: u32 = 117u32;
18965    const NAME: &'static str = "LOG_REQUEST_LIST";
18966    const EXTRA_CRC: u8 = 128u8;
18967    const ENCODED_LEN: usize = 6usize;
18968    fn deser(
18969        _version: MavlinkVersion,
18970        __input: &[u8],
18971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18972        let avail_len = __input.len();
18973        let mut payload_buf = [0; Self::ENCODED_LEN];
18974        let mut buf = if avail_len < Self::ENCODED_LEN {
18975            payload_buf[0..avail_len].copy_from_slice(__input);
18976            Bytes::new(&payload_buf)
18977        } else {
18978            Bytes::new(__input)
18979        };
18980        let mut __struct = Self::default();
18981        __struct.start = buf.get_u16_le();
18982        __struct.end = buf.get_u16_le();
18983        __struct.target_system = buf.get_u8();
18984        __struct.target_component = buf.get_u8();
18985        Ok(__struct)
18986    }
18987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18988        let mut __tmp = BytesMut::new(bytes);
18989        #[allow(clippy::absurd_extreme_comparisons)]
18990        #[allow(unused_comparisons)]
18991        if __tmp.remaining() < Self::ENCODED_LEN {
18992            panic!(
18993                "buffer is too small (need {} bytes, but got {})",
18994                Self::ENCODED_LEN,
18995                __tmp.remaining(),
18996            )
18997        }
18998        __tmp.put_u16_le(self.start);
18999        __tmp.put_u16_le(self.end);
19000        __tmp.put_u8(self.target_system);
19001        __tmp.put_u8(self.target_component);
19002        if matches!(version, MavlinkVersion::V2) {
19003            let len = __tmp.len();
19004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19005        } else {
19006            __tmp.len()
19007        }
19008    }
19009}
19010#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19011#[doc = ""]
19012#[doc = "ID: 192"]
19013#[derive(Debug, Clone, PartialEq)]
19014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19016#[cfg_attr(feature = "ts", derive(TS))]
19017#[cfg_attr(feature = "ts", ts(export))]
19018pub struct MAG_CAL_REPORT_DATA {
19019    #[doc = "RMS milligauss residuals."]
19020    pub fitness: f32,
19021    #[doc = "X offset."]
19022    pub ofs_x: f32,
19023    #[doc = "Y offset."]
19024    pub ofs_y: f32,
19025    #[doc = "Z offset."]
19026    pub ofs_z: f32,
19027    #[doc = "X diagonal (matrix 11)."]
19028    pub diag_x: f32,
19029    #[doc = "Y diagonal (matrix 22)."]
19030    pub diag_y: f32,
19031    #[doc = "Z diagonal (matrix 33)."]
19032    pub diag_z: f32,
19033    #[doc = "X off-diagonal (matrix 12 and 21)."]
19034    pub offdiag_x: f32,
19035    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19036    pub offdiag_y: f32,
19037    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19038    pub offdiag_z: f32,
19039    #[doc = "Compass being calibrated."]
19040    pub compass_id: u8,
19041    #[doc = "Bitmask of compasses being calibrated."]
19042    pub cal_mask: u8,
19043    #[doc = "Calibration Status."]
19044    pub cal_status: MagCalStatus,
19045    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19046    pub autosaved: u8,
19047    #[doc = "Confidence in orientation (higher is better)."]
19048    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19049    pub orientation_confidence: f32,
19050    #[doc = "orientation before calibration."]
19051    #[cfg_attr(feature = "serde", serde(default))]
19052    pub old_orientation: MavSensorOrientation,
19053    #[doc = "orientation after calibration."]
19054    #[cfg_attr(feature = "serde", serde(default))]
19055    pub new_orientation: MavSensorOrientation,
19056    #[doc = "field radius correction factor"]
19057    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19058    pub scale_factor: f32,
19059}
19060impl MAG_CAL_REPORT_DATA {
19061    pub const ENCODED_LEN: usize = 54usize;
19062    pub const DEFAULT: Self = Self {
19063        fitness: 0.0_f32,
19064        ofs_x: 0.0_f32,
19065        ofs_y: 0.0_f32,
19066        ofs_z: 0.0_f32,
19067        diag_x: 0.0_f32,
19068        diag_y: 0.0_f32,
19069        diag_z: 0.0_f32,
19070        offdiag_x: 0.0_f32,
19071        offdiag_y: 0.0_f32,
19072        offdiag_z: 0.0_f32,
19073        compass_id: 0_u8,
19074        cal_mask: 0_u8,
19075        cal_status: MagCalStatus::DEFAULT,
19076        autosaved: 0_u8,
19077        orientation_confidence: 0.0_f32,
19078        old_orientation: MavSensorOrientation::DEFAULT,
19079        new_orientation: MavSensorOrientation::DEFAULT,
19080        scale_factor: 0.0_f32,
19081    };
19082    #[cfg(feature = "arbitrary")]
19083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19084        use arbitrary::{Arbitrary, Unstructured};
19085        let mut buf = [0u8; 1024];
19086        rng.fill_bytes(&mut buf);
19087        let mut unstructured = Unstructured::new(&buf);
19088        Self::arbitrary(&mut unstructured).unwrap_or_default()
19089    }
19090}
19091impl Default for MAG_CAL_REPORT_DATA {
19092    fn default() -> Self {
19093        Self::DEFAULT.clone()
19094    }
19095}
19096impl MessageData for MAG_CAL_REPORT_DATA {
19097    type Message = MavMessage;
19098    const ID: u32 = 192u32;
19099    const NAME: &'static str = "MAG_CAL_REPORT";
19100    const EXTRA_CRC: u8 = 36u8;
19101    const ENCODED_LEN: usize = 54usize;
19102    fn deser(
19103        _version: MavlinkVersion,
19104        __input: &[u8],
19105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19106        let avail_len = __input.len();
19107        let mut payload_buf = [0; Self::ENCODED_LEN];
19108        let mut buf = if avail_len < Self::ENCODED_LEN {
19109            payload_buf[0..avail_len].copy_from_slice(__input);
19110            Bytes::new(&payload_buf)
19111        } else {
19112            Bytes::new(__input)
19113        };
19114        let mut __struct = Self::default();
19115        __struct.fitness = buf.get_f32_le();
19116        __struct.ofs_x = buf.get_f32_le();
19117        __struct.ofs_y = buf.get_f32_le();
19118        __struct.ofs_z = buf.get_f32_le();
19119        __struct.diag_x = buf.get_f32_le();
19120        __struct.diag_y = buf.get_f32_le();
19121        __struct.diag_z = buf.get_f32_le();
19122        __struct.offdiag_x = buf.get_f32_le();
19123        __struct.offdiag_y = buf.get_f32_le();
19124        __struct.offdiag_z = buf.get_f32_le();
19125        __struct.compass_id = buf.get_u8();
19126        __struct.cal_mask = buf.get_u8();
19127        let tmp = buf.get_u8();
19128        __struct.cal_status =
19129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19130                enum_type: "MagCalStatus",
19131                value: tmp as u32,
19132            })?;
19133        __struct.autosaved = buf.get_u8();
19134        __struct.orientation_confidence = buf.get_f32_le();
19135        let tmp = buf.get_u8();
19136        __struct.old_orientation =
19137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19138                enum_type: "MavSensorOrientation",
19139                value: tmp as u32,
19140            })?;
19141        let tmp = buf.get_u8();
19142        __struct.new_orientation =
19143            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19144                enum_type: "MavSensorOrientation",
19145                value: tmp as u32,
19146            })?;
19147        __struct.scale_factor = buf.get_f32_le();
19148        Ok(__struct)
19149    }
19150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19151        let mut __tmp = BytesMut::new(bytes);
19152        #[allow(clippy::absurd_extreme_comparisons)]
19153        #[allow(unused_comparisons)]
19154        if __tmp.remaining() < Self::ENCODED_LEN {
19155            panic!(
19156                "buffer is too small (need {} bytes, but got {})",
19157                Self::ENCODED_LEN,
19158                __tmp.remaining(),
19159            )
19160        }
19161        __tmp.put_f32_le(self.fitness);
19162        __tmp.put_f32_le(self.ofs_x);
19163        __tmp.put_f32_le(self.ofs_y);
19164        __tmp.put_f32_le(self.ofs_z);
19165        __tmp.put_f32_le(self.diag_x);
19166        __tmp.put_f32_le(self.diag_y);
19167        __tmp.put_f32_le(self.diag_z);
19168        __tmp.put_f32_le(self.offdiag_x);
19169        __tmp.put_f32_le(self.offdiag_y);
19170        __tmp.put_f32_le(self.offdiag_z);
19171        __tmp.put_u8(self.compass_id);
19172        __tmp.put_u8(self.cal_mask);
19173        __tmp.put_u8(self.cal_status as u8);
19174        __tmp.put_u8(self.autosaved);
19175        if matches!(version, MavlinkVersion::V2) {
19176            __tmp.put_f32_le(self.orientation_confidence);
19177            __tmp.put_u8(self.old_orientation as u8);
19178            __tmp.put_u8(self.new_orientation as u8);
19179            __tmp.put_f32_le(self.scale_factor);
19180            let len = __tmp.len();
19181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19182        } else {
19183            __tmp.len()
19184        }
19185    }
19186}
19187#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19188#[doc = ""]
19189#[doc = "ID: 69"]
19190#[derive(Debug, Clone, PartialEq)]
19191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19193#[cfg_attr(feature = "ts", derive(TS))]
19194#[cfg_attr(feature = "ts", ts(export))]
19195pub struct MANUAL_CONTROL_DATA {
19196    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19197    pub x: i16,
19198    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19199    pub y: i16,
19200    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19201    pub z: i16,
19202    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19203    pub r: i16,
19204    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19205    pub buttons: u16,
19206    #[doc = "The system to be controlled."]
19207    pub target: u8,
19208    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19210    pub buttons2: u16,
19211    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19212    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19213    pub enabled_extensions: u8,
19214    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19216    pub s: i16,
19217    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19218    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19219    pub t: i16,
19220    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19222    pub aux1: i16,
19223    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19224    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19225    pub aux2: i16,
19226    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19227    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19228    pub aux3: i16,
19229    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19231    pub aux4: i16,
19232    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19234    pub aux5: i16,
19235    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19237    pub aux6: i16,
19238}
19239impl MANUAL_CONTROL_DATA {
19240    pub const ENCODED_LEN: usize = 30usize;
19241    pub const DEFAULT: Self = Self {
19242        x: 0_i16,
19243        y: 0_i16,
19244        z: 0_i16,
19245        r: 0_i16,
19246        buttons: 0_u16,
19247        target: 0_u8,
19248        buttons2: 0_u16,
19249        enabled_extensions: 0_u8,
19250        s: 0_i16,
19251        t: 0_i16,
19252        aux1: 0_i16,
19253        aux2: 0_i16,
19254        aux3: 0_i16,
19255        aux4: 0_i16,
19256        aux5: 0_i16,
19257        aux6: 0_i16,
19258    };
19259    #[cfg(feature = "arbitrary")]
19260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19261        use arbitrary::{Arbitrary, Unstructured};
19262        let mut buf = [0u8; 1024];
19263        rng.fill_bytes(&mut buf);
19264        let mut unstructured = Unstructured::new(&buf);
19265        Self::arbitrary(&mut unstructured).unwrap_or_default()
19266    }
19267}
19268impl Default for MANUAL_CONTROL_DATA {
19269    fn default() -> Self {
19270        Self::DEFAULT.clone()
19271    }
19272}
19273impl MessageData for MANUAL_CONTROL_DATA {
19274    type Message = MavMessage;
19275    const ID: u32 = 69u32;
19276    const NAME: &'static str = "MANUAL_CONTROL";
19277    const EXTRA_CRC: u8 = 243u8;
19278    const ENCODED_LEN: usize = 30usize;
19279    fn deser(
19280        _version: MavlinkVersion,
19281        __input: &[u8],
19282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19283        let avail_len = __input.len();
19284        let mut payload_buf = [0; Self::ENCODED_LEN];
19285        let mut buf = if avail_len < Self::ENCODED_LEN {
19286            payload_buf[0..avail_len].copy_from_slice(__input);
19287            Bytes::new(&payload_buf)
19288        } else {
19289            Bytes::new(__input)
19290        };
19291        let mut __struct = Self::default();
19292        __struct.x = buf.get_i16_le();
19293        __struct.y = buf.get_i16_le();
19294        __struct.z = buf.get_i16_le();
19295        __struct.r = buf.get_i16_le();
19296        __struct.buttons = buf.get_u16_le();
19297        __struct.target = buf.get_u8();
19298        __struct.buttons2 = buf.get_u16_le();
19299        __struct.enabled_extensions = buf.get_u8();
19300        __struct.s = buf.get_i16_le();
19301        __struct.t = buf.get_i16_le();
19302        __struct.aux1 = buf.get_i16_le();
19303        __struct.aux2 = buf.get_i16_le();
19304        __struct.aux3 = buf.get_i16_le();
19305        __struct.aux4 = buf.get_i16_le();
19306        __struct.aux5 = buf.get_i16_le();
19307        __struct.aux6 = buf.get_i16_le();
19308        Ok(__struct)
19309    }
19310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19311        let mut __tmp = BytesMut::new(bytes);
19312        #[allow(clippy::absurd_extreme_comparisons)]
19313        #[allow(unused_comparisons)]
19314        if __tmp.remaining() < Self::ENCODED_LEN {
19315            panic!(
19316                "buffer is too small (need {} bytes, but got {})",
19317                Self::ENCODED_LEN,
19318                __tmp.remaining(),
19319            )
19320        }
19321        __tmp.put_i16_le(self.x);
19322        __tmp.put_i16_le(self.y);
19323        __tmp.put_i16_le(self.z);
19324        __tmp.put_i16_le(self.r);
19325        __tmp.put_u16_le(self.buttons);
19326        __tmp.put_u8(self.target);
19327        if matches!(version, MavlinkVersion::V2) {
19328            __tmp.put_u16_le(self.buttons2);
19329            __tmp.put_u8(self.enabled_extensions);
19330            __tmp.put_i16_le(self.s);
19331            __tmp.put_i16_le(self.t);
19332            __tmp.put_i16_le(self.aux1);
19333            __tmp.put_i16_le(self.aux2);
19334            __tmp.put_i16_le(self.aux3);
19335            __tmp.put_i16_le(self.aux4);
19336            __tmp.put_i16_le(self.aux5);
19337            __tmp.put_i16_le(self.aux6);
19338            let len = __tmp.len();
19339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19340        } else {
19341            __tmp.len()
19342        }
19343    }
19344}
19345#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19346#[doc = ""]
19347#[doc = "ID: 81"]
19348#[derive(Debug, Clone, PartialEq)]
19349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19351#[cfg_attr(feature = "ts", derive(TS))]
19352#[cfg_attr(feature = "ts", ts(export))]
19353pub struct MANUAL_SETPOINT_DATA {
19354    #[doc = "Timestamp (time since system boot)."]
19355    pub time_boot_ms: u32,
19356    #[doc = "Desired roll rate"]
19357    pub roll: f32,
19358    #[doc = "Desired pitch rate"]
19359    pub pitch: f32,
19360    #[doc = "Desired yaw rate"]
19361    pub yaw: f32,
19362    #[doc = "Collective thrust, normalized to 0 .. 1"]
19363    pub thrust: f32,
19364    #[doc = "Flight mode switch position, 0.. 255"]
19365    pub mode_switch: u8,
19366    #[doc = "Override mode switch position, 0.. 255"]
19367    pub manual_override_switch: u8,
19368}
19369impl MANUAL_SETPOINT_DATA {
19370    pub const ENCODED_LEN: usize = 22usize;
19371    pub const DEFAULT: Self = Self {
19372        time_boot_ms: 0_u32,
19373        roll: 0.0_f32,
19374        pitch: 0.0_f32,
19375        yaw: 0.0_f32,
19376        thrust: 0.0_f32,
19377        mode_switch: 0_u8,
19378        manual_override_switch: 0_u8,
19379    };
19380    #[cfg(feature = "arbitrary")]
19381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19382        use arbitrary::{Arbitrary, Unstructured};
19383        let mut buf = [0u8; 1024];
19384        rng.fill_bytes(&mut buf);
19385        let mut unstructured = Unstructured::new(&buf);
19386        Self::arbitrary(&mut unstructured).unwrap_or_default()
19387    }
19388}
19389impl Default for MANUAL_SETPOINT_DATA {
19390    fn default() -> Self {
19391        Self::DEFAULT.clone()
19392    }
19393}
19394impl MessageData for MANUAL_SETPOINT_DATA {
19395    type Message = MavMessage;
19396    const ID: u32 = 81u32;
19397    const NAME: &'static str = "MANUAL_SETPOINT";
19398    const EXTRA_CRC: u8 = 106u8;
19399    const ENCODED_LEN: usize = 22usize;
19400    fn deser(
19401        _version: MavlinkVersion,
19402        __input: &[u8],
19403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19404        let avail_len = __input.len();
19405        let mut payload_buf = [0; Self::ENCODED_LEN];
19406        let mut buf = if avail_len < Self::ENCODED_LEN {
19407            payload_buf[0..avail_len].copy_from_slice(__input);
19408            Bytes::new(&payload_buf)
19409        } else {
19410            Bytes::new(__input)
19411        };
19412        let mut __struct = Self::default();
19413        __struct.time_boot_ms = buf.get_u32_le();
19414        __struct.roll = buf.get_f32_le();
19415        __struct.pitch = buf.get_f32_le();
19416        __struct.yaw = buf.get_f32_le();
19417        __struct.thrust = buf.get_f32_le();
19418        __struct.mode_switch = buf.get_u8();
19419        __struct.manual_override_switch = buf.get_u8();
19420        Ok(__struct)
19421    }
19422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19423        let mut __tmp = BytesMut::new(bytes);
19424        #[allow(clippy::absurd_extreme_comparisons)]
19425        #[allow(unused_comparisons)]
19426        if __tmp.remaining() < Self::ENCODED_LEN {
19427            panic!(
19428                "buffer is too small (need {} bytes, but got {})",
19429                Self::ENCODED_LEN,
19430                __tmp.remaining(),
19431            )
19432        }
19433        __tmp.put_u32_le(self.time_boot_ms);
19434        __tmp.put_f32_le(self.roll);
19435        __tmp.put_f32_le(self.pitch);
19436        __tmp.put_f32_le(self.yaw);
19437        __tmp.put_f32_le(self.thrust);
19438        __tmp.put_u8(self.mode_switch);
19439        __tmp.put_u8(self.manual_override_switch);
19440        if matches!(version, MavlinkVersion::V2) {
19441            let len = __tmp.len();
19442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19443        } else {
19444            __tmp.len()
19445        }
19446    }
19447}
19448#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19449#[doc = ""]
19450#[doc = "ID: 249"]
19451#[derive(Debug, Clone, PartialEq)]
19452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19454#[cfg_attr(feature = "ts", derive(TS))]
19455#[cfg_attr(feature = "ts", ts(export))]
19456pub struct MEMORY_VECT_DATA {
19457    #[doc = "Starting address of the debug variables"]
19458    pub address: u16,
19459    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19460    pub ver: u8,
19461    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19462    pub mavtype: u8,
19463    #[doc = "Memory contents at specified address"]
19464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19466    pub value: [i8; 32],
19467}
19468impl MEMORY_VECT_DATA {
19469    pub const ENCODED_LEN: usize = 36usize;
19470    pub const DEFAULT: Self = Self {
19471        address: 0_u16,
19472        ver: 0_u8,
19473        mavtype: 0_u8,
19474        value: [0_i8; 32usize],
19475    };
19476    #[cfg(feature = "arbitrary")]
19477    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19478        use arbitrary::{Arbitrary, Unstructured};
19479        let mut buf = [0u8; 1024];
19480        rng.fill_bytes(&mut buf);
19481        let mut unstructured = Unstructured::new(&buf);
19482        Self::arbitrary(&mut unstructured).unwrap_or_default()
19483    }
19484}
19485impl Default for MEMORY_VECT_DATA {
19486    fn default() -> Self {
19487        Self::DEFAULT.clone()
19488    }
19489}
19490impl MessageData for MEMORY_VECT_DATA {
19491    type Message = MavMessage;
19492    const ID: u32 = 249u32;
19493    const NAME: &'static str = "MEMORY_VECT";
19494    const EXTRA_CRC: u8 = 204u8;
19495    const ENCODED_LEN: usize = 36usize;
19496    fn deser(
19497        _version: MavlinkVersion,
19498        __input: &[u8],
19499    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19500        let avail_len = __input.len();
19501        let mut payload_buf = [0; Self::ENCODED_LEN];
19502        let mut buf = if avail_len < Self::ENCODED_LEN {
19503            payload_buf[0..avail_len].copy_from_slice(__input);
19504            Bytes::new(&payload_buf)
19505        } else {
19506            Bytes::new(__input)
19507        };
19508        let mut __struct = Self::default();
19509        __struct.address = buf.get_u16_le();
19510        __struct.ver = buf.get_u8();
19511        __struct.mavtype = buf.get_u8();
19512        for v in &mut __struct.value {
19513            let val = buf.get_i8();
19514            *v = val;
19515        }
19516        Ok(__struct)
19517    }
19518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19519        let mut __tmp = BytesMut::new(bytes);
19520        #[allow(clippy::absurd_extreme_comparisons)]
19521        #[allow(unused_comparisons)]
19522        if __tmp.remaining() < Self::ENCODED_LEN {
19523            panic!(
19524                "buffer is too small (need {} bytes, but got {})",
19525                Self::ENCODED_LEN,
19526                __tmp.remaining(),
19527            )
19528        }
19529        __tmp.put_u16_le(self.address);
19530        __tmp.put_u8(self.ver);
19531        __tmp.put_u8(self.mavtype);
19532        for val in &self.value {
19533            __tmp.put_i8(*val);
19534        }
19535        if matches!(version, MavlinkVersion::V2) {
19536            let len = __tmp.len();
19537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19538        } else {
19539            __tmp.len()
19540        }
19541    }
19542}
19543#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19544#[doc = ""]
19545#[doc = "ID: 244"]
19546#[derive(Debug, Clone, PartialEq)]
19547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19549#[cfg_attr(feature = "ts", derive(TS))]
19550#[cfg_attr(feature = "ts", ts(export))]
19551pub struct MESSAGE_INTERVAL_DATA {
19552    #[doc = "0 indicates the interval at which it is sent."]
19553    pub interval_us: i32,
19554    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19555    pub message_id: u16,
19556}
19557impl MESSAGE_INTERVAL_DATA {
19558    pub const ENCODED_LEN: usize = 6usize;
19559    pub const DEFAULT: Self = Self {
19560        interval_us: 0_i32,
19561        message_id: 0_u16,
19562    };
19563    #[cfg(feature = "arbitrary")]
19564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19565        use arbitrary::{Arbitrary, Unstructured};
19566        let mut buf = [0u8; 1024];
19567        rng.fill_bytes(&mut buf);
19568        let mut unstructured = Unstructured::new(&buf);
19569        Self::arbitrary(&mut unstructured).unwrap_or_default()
19570    }
19571}
19572impl Default for MESSAGE_INTERVAL_DATA {
19573    fn default() -> Self {
19574        Self::DEFAULT.clone()
19575    }
19576}
19577impl MessageData for MESSAGE_INTERVAL_DATA {
19578    type Message = MavMessage;
19579    const ID: u32 = 244u32;
19580    const NAME: &'static str = "MESSAGE_INTERVAL";
19581    const EXTRA_CRC: u8 = 95u8;
19582    const ENCODED_LEN: usize = 6usize;
19583    fn deser(
19584        _version: MavlinkVersion,
19585        __input: &[u8],
19586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19587        let avail_len = __input.len();
19588        let mut payload_buf = [0; Self::ENCODED_LEN];
19589        let mut buf = if avail_len < Self::ENCODED_LEN {
19590            payload_buf[0..avail_len].copy_from_slice(__input);
19591            Bytes::new(&payload_buf)
19592        } else {
19593            Bytes::new(__input)
19594        };
19595        let mut __struct = Self::default();
19596        __struct.interval_us = buf.get_i32_le();
19597        __struct.message_id = buf.get_u16_le();
19598        Ok(__struct)
19599    }
19600    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19601        let mut __tmp = BytesMut::new(bytes);
19602        #[allow(clippy::absurd_extreme_comparisons)]
19603        #[allow(unused_comparisons)]
19604        if __tmp.remaining() < Self::ENCODED_LEN {
19605            panic!(
19606                "buffer is too small (need {} bytes, but got {})",
19607                Self::ENCODED_LEN,
19608                __tmp.remaining(),
19609            )
19610        }
19611        __tmp.put_i32_le(self.interval_us);
19612        __tmp.put_u16_le(self.message_id);
19613        if matches!(version, MavlinkVersion::V2) {
19614            let len = __tmp.len();
19615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19616        } else {
19617            __tmp.len()
19618        }
19619    }
19620}
19621#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19622#[doc = ""]
19623#[doc = "ID: 47"]
19624#[derive(Debug, Clone, PartialEq)]
19625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19627#[cfg_attr(feature = "ts", derive(TS))]
19628#[cfg_attr(feature = "ts", ts(export))]
19629pub struct MISSION_ACK_DATA {
19630    #[doc = "System ID"]
19631    pub target_system: u8,
19632    #[doc = "Component ID"]
19633    pub target_component: u8,
19634    #[doc = "Mission result."]
19635    pub mavtype: MavMissionResult,
19636    #[doc = "Mission type."]
19637    #[cfg_attr(feature = "serde", serde(default))]
19638    pub mission_type: MavMissionType,
19639    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19641    pub opaque_id: u32,
19642}
19643impl MISSION_ACK_DATA {
19644    pub const ENCODED_LEN: usize = 8usize;
19645    pub const DEFAULT: Self = Self {
19646        target_system: 0_u8,
19647        target_component: 0_u8,
19648        mavtype: MavMissionResult::DEFAULT,
19649        mission_type: MavMissionType::DEFAULT,
19650        opaque_id: 0_u32,
19651    };
19652    #[cfg(feature = "arbitrary")]
19653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19654        use arbitrary::{Arbitrary, Unstructured};
19655        let mut buf = [0u8; 1024];
19656        rng.fill_bytes(&mut buf);
19657        let mut unstructured = Unstructured::new(&buf);
19658        Self::arbitrary(&mut unstructured).unwrap_or_default()
19659    }
19660}
19661impl Default for MISSION_ACK_DATA {
19662    fn default() -> Self {
19663        Self::DEFAULT.clone()
19664    }
19665}
19666impl MessageData for MISSION_ACK_DATA {
19667    type Message = MavMessage;
19668    const ID: u32 = 47u32;
19669    const NAME: &'static str = "MISSION_ACK";
19670    const EXTRA_CRC: u8 = 153u8;
19671    const ENCODED_LEN: usize = 8usize;
19672    fn deser(
19673        _version: MavlinkVersion,
19674        __input: &[u8],
19675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19676        let avail_len = __input.len();
19677        let mut payload_buf = [0; Self::ENCODED_LEN];
19678        let mut buf = if avail_len < Self::ENCODED_LEN {
19679            payload_buf[0..avail_len].copy_from_slice(__input);
19680            Bytes::new(&payload_buf)
19681        } else {
19682            Bytes::new(__input)
19683        };
19684        let mut __struct = Self::default();
19685        __struct.target_system = buf.get_u8();
19686        __struct.target_component = buf.get_u8();
19687        let tmp = buf.get_u8();
19688        __struct.mavtype =
19689            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19690                enum_type: "MavMissionResult",
19691                value: tmp as u32,
19692            })?;
19693        let tmp = buf.get_u8();
19694        __struct.mission_type =
19695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19696                enum_type: "MavMissionType",
19697                value: tmp as u32,
19698            })?;
19699        __struct.opaque_id = buf.get_u32_le();
19700        Ok(__struct)
19701    }
19702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19703        let mut __tmp = BytesMut::new(bytes);
19704        #[allow(clippy::absurd_extreme_comparisons)]
19705        #[allow(unused_comparisons)]
19706        if __tmp.remaining() < Self::ENCODED_LEN {
19707            panic!(
19708                "buffer is too small (need {} bytes, but got {})",
19709                Self::ENCODED_LEN,
19710                __tmp.remaining(),
19711            )
19712        }
19713        __tmp.put_u8(self.target_system);
19714        __tmp.put_u8(self.target_component);
19715        __tmp.put_u8(self.mavtype as u8);
19716        if matches!(version, MavlinkVersion::V2) {
19717            __tmp.put_u8(self.mission_type as u8);
19718            __tmp.put_u32_le(self.opaque_id);
19719            let len = __tmp.len();
19720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19721        } else {
19722            __tmp.len()
19723        }
19724    }
19725}
19726#[doc = "Delete all mission items at once."]
19727#[doc = ""]
19728#[doc = "ID: 45"]
19729#[derive(Debug, Clone, PartialEq)]
19730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19732#[cfg_attr(feature = "ts", derive(TS))]
19733#[cfg_attr(feature = "ts", ts(export))]
19734pub struct MISSION_CLEAR_ALL_DATA {
19735    #[doc = "System ID"]
19736    pub target_system: u8,
19737    #[doc = "Component ID"]
19738    pub target_component: u8,
19739    #[doc = "Mission type."]
19740    #[cfg_attr(feature = "serde", serde(default))]
19741    pub mission_type: MavMissionType,
19742}
19743impl MISSION_CLEAR_ALL_DATA {
19744    pub const ENCODED_LEN: usize = 3usize;
19745    pub const DEFAULT: Self = Self {
19746        target_system: 0_u8,
19747        target_component: 0_u8,
19748        mission_type: MavMissionType::DEFAULT,
19749    };
19750    #[cfg(feature = "arbitrary")]
19751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19752        use arbitrary::{Arbitrary, Unstructured};
19753        let mut buf = [0u8; 1024];
19754        rng.fill_bytes(&mut buf);
19755        let mut unstructured = Unstructured::new(&buf);
19756        Self::arbitrary(&mut unstructured).unwrap_or_default()
19757    }
19758}
19759impl Default for MISSION_CLEAR_ALL_DATA {
19760    fn default() -> Self {
19761        Self::DEFAULT.clone()
19762    }
19763}
19764impl MessageData for MISSION_CLEAR_ALL_DATA {
19765    type Message = MavMessage;
19766    const ID: u32 = 45u32;
19767    const NAME: &'static str = "MISSION_CLEAR_ALL";
19768    const EXTRA_CRC: u8 = 232u8;
19769    const ENCODED_LEN: usize = 3usize;
19770    fn deser(
19771        _version: MavlinkVersion,
19772        __input: &[u8],
19773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19774        let avail_len = __input.len();
19775        let mut payload_buf = [0; Self::ENCODED_LEN];
19776        let mut buf = if avail_len < Self::ENCODED_LEN {
19777            payload_buf[0..avail_len].copy_from_slice(__input);
19778            Bytes::new(&payload_buf)
19779        } else {
19780            Bytes::new(__input)
19781        };
19782        let mut __struct = Self::default();
19783        __struct.target_system = buf.get_u8();
19784        __struct.target_component = buf.get_u8();
19785        let tmp = buf.get_u8();
19786        __struct.mission_type =
19787            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19788                enum_type: "MavMissionType",
19789                value: tmp as u32,
19790            })?;
19791        Ok(__struct)
19792    }
19793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19794        let mut __tmp = BytesMut::new(bytes);
19795        #[allow(clippy::absurd_extreme_comparisons)]
19796        #[allow(unused_comparisons)]
19797        if __tmp.remaining() < Self::ENCODED_LEN {
19798            panic!(
19799                "buffer is too small (need {} bytes, but got {})",
19800                Self::ENCODED_LEN,
19801                __tmp.remaining(),
19802            )
19803        }
19804        __tmp.put_u8(self.target_system);
19805        __tmp.put_u8(self.target_component);
19806        if matches!(version, MavlinkVersion::V2) {
19807            __tmp.put_u8(self.mission_type as u8);
19808            let len = __tmp.len();
19809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19810        } else {
19811            __tmp.len()
19812        }
19813    }
19814}
19815#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19816#[doc = ""]
19817#[doc = "ID: 44"]
19818#[derive(Debug, Clone, PartialEq)]
19819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19821#[cfg_attr(feature = "ts", derive(TS))]
19822#[cfg_attr(feature = "ts", ts(export))]
19823pub struct MISSION_COUNT_DATA {
19824    #[doc = "Number of mission items in the sequence"]
19825    pub count: u16,
19826    #[doc = "System ID"]
19827    pub target_system: u8,
19828    #[doc = "Component ID"]
19829    pub target_component: u8,
19830    #[doc = "Mission type."]
19831    #[cfg_attr(feature = "serde", serde(default))]
19832    pub mission_type: MavMissionType,
19833    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19834    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19835    pub opaque_id: u32,
19836}
19837impl MISSION_COUNT_DATA {
19838    pub const ENCODED_LEN: usize = 9usize;
19839    pub const DEFAULT: Self = Self {
19840        count: 0_u16,
19841        target_system: 0_u8,
19842        target_component: 0_u8,
19843        mission_type: MavMissionType::DEFAULT,
19844        opaque_id: 0_u32,
19845    };
19846    #[cfg(feature = "arbitrary")]
19847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19848        use arbitrary::{Arbitrary, Unstructured};
19849        let mut buf = [0u8; 1024];
19850        rng.fill_bytes(&mut buf);
19851        let mut unstructured = Unstructured::new(&buf);
19852        Self::arbitrary(&mut unstructured).unwrap_or_default()
19853    }
19854}
19855impl Default for MISSION_COUNT_DATA {
19856    fn default() -> Self {
19857        Self::DEFAULT.clone()
19858    }
19859}
19860impl MessageData for MISSION_COUNT_DATA {
19861    type Message = MavMessage;
19862    const ID: u32 = 44u32;
19863    const NAME: &'static str = "MISSION_COUNT";
19864    const EXTRA_CRC: u8 = 221u8;
19865    const ENCODED_LEN: usize = 9usize;
19866    fn deser(
19867        _version: MavlinkVersion,
19868        __input: &[u8],
19869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19870        let avail_len = __input.len();
19871        let mut payload_buf = [0; Self::ENCODED_LEN];
19872        let mut buf = if avail_len < Self::ENCODED_LEN {
19873            payload_buf[0..avail_len].copy_from_slice(__input);
19874            Bytes::new(&payload_buf)
19875        } else {
19876            Bytes::new(__input)
19877        };
19878        let mut __struct = Self::default();
19879        __struct.count = buf.get_u16_le();
19880        __struct.target_system = buf.get_u8();
19881        __struct.target_component = buf.get_u8();
19882        let tmp = buf.get_u8();
19883        __struct.mission_type =
19884            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19885                enum_type: "MavMissionType",
19886                value: tmp as u32,
19887            })?;
19888        __struct.opaque_id = buf.get_u32_le();
19889        Ok(__struct)
19890    }
19891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19892        let mut __tmp = BytesMut::new(bytes);
19893        #[allow(clippy::absurd_extreme_comparisons)]
19894        #[allow(unused_comparisons)]
19895        if __tmp.remaining() < Self::ENCODED_LEN {
19896            panic!(
19897                "buffer is too small (need {} bytes, but got {})",
19898                Self::ENCODED_LEN,
19899                __tmp.remaining(),
19900            )
19901        }
19902        __tmp.put_u16_le(self.count);
19903        __tmp.put_u8(self.target_system);
19904        __tmp.put_u8(self.target_component);
19905        if matches!(version, MavlinkVersion::V2) {
19906            __tmp.put_u8(self.mission_type as u8);
19907            __tmp.put_u32_le(self.opaque_id);
19908            let len = __tmp.len();
19909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19910        } else {
19911            __tmp.len()
19912        }
19913    }
19914}
19915#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19916#[doc = ""]
19917#[doc = "ID: 42"]
19918#[derive(Debug, Clone, PartialEq)]
19919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19921#[cfg_attr(feature = "ts", derive(TS))]
19922#[cfg_attr(feature = "ts", ts(export))]
19923pub struct MISSION_CURRENT_DATA {
19924    #[doc = "Sequence"]
19925    pub seq: u16,
19926    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19928    pub total: u16,
19929    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19930    #[cfg_attr(feature = "serde", serde(default))]
19931    pub mission_state: MissionState,
19932    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19934    pub mission_mode: u8,
19935    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19937    pub mission_id: u32,
19938    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19940    pub fence_id: u32,
19941    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19942    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19943    pub rally_points_id: u32,
19944}
19945impl MISSION_CURRENT_DATA {
19946    pub const ENCODED_LEN: usize = 18usize;
19947    pub const DEFAULT: Self = Self {
19948        seq: 0_u16,
19949        total: 0_u16,
19950        mission_state: MissionState::DEFAULT,
19951        mission_mode: 0_u8,
19952        mission_id: 0_u32,
19953        fence_id: 0_u32,
19954        rally_points_id: 0_u32,
19955    };
19956    #[cfg(feature = "arbitrary")]
19957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19958        use arbitrary::{Arbitrary, Unstructured};
19959        let mut buf = [0u8; 1024];
19960        rng.fill_bytes(&mut buf);
19961        let mut unstructured = Unstructured::new(&buf);
19962        Self::arbitrary(&mut unstructured).unwrap_or_default()
19963    }
19964}
19965impl Default for MISSION_CURRENT_DATA {
19966    fn default() -> Self {
19967        Self::DEFAULT.clone()
19968    }
19969}
19970impl MessageData for MISSION_CURRENT_DATA {
19971    type Message = MavMessage;
19972    const ID: u32 = 42u32;
19973    const NAME: &'static str = "MISSION_CURRENT";
19974    const EXTRA_CRC: u8 = 28u8;
19975    const ENCODED_LEN: usize = 18usize;
19976    fn deser(
19977        _version: MavlinkVersion,
19978        __input: &[u8],
19979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19980        let avail_len = __input.len();
19981        let mut payload_buf = [0; Self::ENCODED_LEN];
19982        let mut buf = if avail_len < Self::ENCODED_LEN {
19983            payload_buf[0..avail_len].copy_from_slice(__input);
19984            Bytes::new(&payload_buf)
19985        } else {
19986            Bytes::new(__input)
19987        };
19988        let mut __struct = Self::default();
19989        __struct.seq = buf.get_u16_le();
19990        __struct.total = buf.get_u16_le();
19991        let tmp = buf.get_u8();
19992        __struct.mission_state =
19993            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19994                enum_type: "MissionState",
19995                value: tmp as u32,
19996            })?;
19997        __struct.mission_mode = buf.get_u8();
19998        __struct.mission_id = buf.get_u32_le();
19999        __struct.fence_id = buf.get_u32_le();
20000        __struct.rally_points_id = buf.get_u32_le();
20001        Ok(__struct)
20002    }
20003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20004        let mut __tmp = BytesMut::new(bytes);
20005        #[allow(clippy::absurd_extreme_comparisons)]
20006        #[allow(unused_comparisons)]
20007        if __tmp.remaining() < Self::ENCODED_LEN {
20008            panic!(
20009                "buffer is too small (need {} bytes, but got {})",
20010                Self::ENCODED_LEN,
20011                __tmp.remaining(),
20012            )
20013        }
20014        __tmp.put_u16_le(self.seq);
20015        if matches!(version, MavlinkVersion::V2) {
20016            __tmp.put_u16_le(self.total);
20017            __tmp.put_u8(self.mission_state as u8);
20018            __tmp.put_u8(self.mission_mode);
20019            __tmp.put_u32_le(self.mission_id);
20020            __tmp.put_u32_le(self.fence_id);
20021            __tmp.put_u32_le(self.rally_points_id);
20022            let len = __tmp.len();
20023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20024        } else {
20025            __tmp.len()
20026        }
20027    }
20028}
20029#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20030#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20031#[doc = ""]
20032#[doc = "ID: 39"]
20033#[derive(Debug, Clone, PartialEq)]
20034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20036#[cfg_attr(feature = "ts", derive(TS))]
20037#[cfg_attr(feature = "ts", ts(export))]
20038pub struct MISSION_ITEM_DATA {
20039    #[doc = "PARAM1, see MAV_CMD enum"]
20040    pub param1: f32,
20041    #[doc = "PARAM2, see MAV_CMD enum"]
20042    pub param2: f32,
20043    #[doc = "PARAM3, see MAV_CMD enum"]
20044    pub param3: f32,
20045    #[doc = "PARAM4, see MAV_CMD enum"]
20046    pub param4: f32,
20047    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20048    pub x: f32,
20049    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20050    pub y: f32,
20051    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20052    pub z: f32,
20053    #[doc = "Sequence"]
20054    pub seq: u16,
20055    #[doc = "The scheduled action for the waypoint."]
20056    pub command: MavCmd,
20057    #[doc = "System ID"]
20058    pub target_system: u8,
20059    #[doc = "Component ID"]
20060    pub target_component: u8,
20061    #[doc = "The coordinate system of the waypoint."]
20062    pub frame: MavFrame,
20063    #[doc = "false:0, true:1"]
20064    pub current: u8,
20065    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20066    pub autocontinue: u8,
20067    #[doc = "Mission type."]
20068    #[cfg_attr(feature = "serde", serde(default))]
20069    pub mission_type: MavMissionType,
20070}
20071impl MISSION_ITEM_DATA {
20072    pub const ENCODED_LEN: usize = 38usize;
20073    pub const DEFAULT: Self = Self {
20074        param1: 0.0_f32,
20075        param2: 0.0_f32,
20076        param3: 0.0_f32,
20077        param4: 0.0_f32,
20078        x: 0.0_f32,
20079        y: 0.0_f32,
20080        z: 0.0_f32,
20081        seq: 0_u16,
20082        command: MavCmd::DEFAULT,
20083        target_system: 0_u8,
20084        target_component: 0_u8,
20085        frame: MavFrame::DEFAULT,
20086        current: 0_u8,
20087        autocontinue: 0_u8,
20088        mission_type: MavMissionType::DEFAULT,
20089    };
20090    #[cfg(feature = "arbitrary")]
20091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20092        use arbitrary::{Arbitrary, Unstructured};
20093        let mut buf = [0u8; 1024];
20094        rng.fill_bytes(&mut buf);
20095        let mut unstructured = Unstructured::new(&buf);
20096        Self::arbitrary(&mut unstructured).unwrap_or_default()
20097    }
20098}
20099impl Default for MISSION_ITEM_DATA {
20100    fn default() -> Self {
20101        Self::DEFAULT.clone()
20102    }
20103}
20104impl MessageData for MISSION_ITEM_DATA {
20105    type Message = MavMessage;
20106    const ID: u32 = 39u32;
20107    const NAME: &'static str = "MISSION_ITEM";
20108    const EXTRA_CRC: u8 = 254u8;
20109    const ENCODED_LEN: usize = 38usize;
20110    fn deser(
20111        _version: MavlinkVersion,
20112        __input: &[u8],
20113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20114        let avail_len = __input.len();
20115        let mut payload_buf = [0; Self::ENCODED_LEN];
20116        let mut buf = if avail_len < Self::ENCODED_LEN {
20117            payload_buf[0..avail_len].copy_from_slice(__input);
20118            Bytes::new(&payload_buf)
20119        } else {
20120            Bytes::new(__input)
20121        };
20122        let mut __struct = Self::default();
20123        __struct.param1 = buf.get_f32_le();
20124        __struct.param2 = buf.get_f32_le();
20125        __struct.param3 = buf.get_f32_le();
20126        __struct.param4 = buf.get_f32_le();
20127        __struct.x = buf.get_f32_le();
20128        __struct.y = buf.get_f32_le();
20129        __struct.z = buf.get_f32_le();
20130        __struct.seq = buf.get_u16_le();
20131        let tmp = buf.get_u16_le();
20132        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20133            ::mavlink_core::error::ParserError::InvalidEnum {
20134                enum_type: "MavCmd",
20135                value: tmp as u32,
20136            },
20137        )?;
20138        __struct.target_system = buf.get_u8();
20139        __struct.target_component = buf.get_u8();
20140        let tmp = buf.get_u8();
20141        __struct.frame =
20142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20143                enum_type: "MavFrame",
20144                value: tmp as u32,
20145            })?;
20146        __struct.current = buf.get_u8();
20147        __struct.autocontinue = buf.get_u8();
20148        let tmp = buf.get_u8();
20149        __struct.mission_type =
20150            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20151                enum_type: "MavMissionType",
20152                value: tmp as u32,
20153            })?;
20154        Ok(__struct)
20155    }
20156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20157        let mut __tmp = BytesMut::new(bytes);
20158        #[allow(clippy::absurd_extreme_comparisons)]
20159        #[allow(unused_comparisons)]
20160        if __tmp.remaining() < Self::ENCODED_LEN {
20161            panic!(
20162                "buffer is too small (need {} bytes, but got {})",
20163                Self::ENCODED_LEN,
20164                __tmp.remaining(),
20165            )
20166        }
20167        __tmp.put_f32_le(self.param1);
20168        __tmp.put_f32_le(self.param2);
20169        __tmp.put_f32_le(self.param3);
20170        __tmp.put_f32_le(self.param4);
20171        __tmp.put_f32_le(self.x);
20172        __tmp.put_f32_le(self.y);
20173        __tmp.put_f32_le(self.z);
20174        __tmp.put_u16_le(self.seq);
20175        __tmp.put_u16_le(self.command as u16);
20176        __tmp.put_u8(self.target_system);
20177        __tmp.put_u8(self.target_component);
20178        __tmp.put_u8(self.frame as u8);
20179        __tmp.put_u8(self.current);
20180        __tmp.put_u8(self.autocontinue);
20181        if matches!(version, MavlinkVersion::V2) {
20182            __tmp.put_u8(self.mission_type as u8);
20183            let len = __tmp.len();
20184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20185        } else {
20186            __tmp.len()
20187        }
20188    }
20189}
20190#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20191#[doc = ""]
20192#[doc = "ID: 73"]
20193#[derive(Debug, Clone, PartialEq)]
20194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20196#[cfg_attr(feature = "ts", derive(TS))]
20197#[cfg_attr(feature = "ts", ts(export))]
20198pub struct MISSION_ITEM_INT_DATA {
20199    #[doc = "PARAM1, see MAV_CMD enum"]
20200    pub param1: f32,
20201    #[doc = "PARAM2, see MAV_CMD enum"]
20202    pub param2: f32,
20203    #[doc = "PARAM3, see MAV_CMD enum"]
20204    pub param3: f32,
20205    #[doc = "PARAM4, see MAV_CMD enum"]
20206    pub param4: f32,
20207    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20208    pub x: i32,
20209    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20210    pub y: i32,
20211    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20212    pub z: f32,
20213    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20214    pub seq: u16,
20215    #[doc = "The scheduled action for the waypoint."]
20216    pub command: MavCmd,
20217    #[doc = "System ID"]
20218    pub target_system: u8,
20219    #[doc = "Component ID"]
20220    pub target_component: u8,
20221    #[doc = "The coordinate system of the waypoint."]
20222    pub frame: MavFrame,
20223    #[doc = "false:0, true:1"]
20224    pub current: u8,
20225    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20226    pub autocontinue: u8,
20227    #[doc = "Mission type."]
20228    #[cfg_attr(feature = "serde", serde(default))]
20229    pub mission_type: MavMissionType,
20230}
20231impl MISSION_ITEM_INT_DATA {
20232    pub const ENCODED_LEN: usize = 38usize;
20233    pub const DEFAULT: Self = Self {
20234        param1: 0.0_f32,
20235        param2: 0.0_f32,
20236        param3: 0.0_f32,
20237        param4: 0.0_f32,
20238        x: 0_i32,
20239        y: 0_i32,
20240        z: 0.0_f32,
20241        seq: 0_u16,
20242        command: MavCmd::DEFAULT,
20243        target_system: 0_u8,
20244        target_component: 0_u8,
20245        frame: MavFrame::DEFAULT,
20246        current: 0_u8,
20247        autocontinue: 0_u8,
20248        mission_type: MavMissionType::DEFAULT,
20249    };
20250    #[cfg(feature = "arbitrary")]
20251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20252        use arbitrary::{Arbitrary, Unstructured};
20253        let mut buf = [0u8; 1024];
20254        rng.fill_bytes(&mut buf);
20255        let mut unstructured = Unstructured::new(&buf);
20256        Self::arbitrary(&mut unstructured).unwrap_or_default()
20257    }
20258}
20259impl Default for MISSION_ITEM_INT_DATA {
20260    fn default() -> Self {
20261        Self::DEFAULT.clone()
20262    }
20263}
20264impl MessageData for MISSION_ITEM_INT_DATA {
20265    type Message = MavMessage;
20266    const ID: u32 = 73u32;
20267    const NAME: &'static str = "MISSION_ITEM_INT";
20268    const EXTRA_CRC: u8 = 38u8;
20269    const ENCODED_LEN: usize = 38usize;
20270    fn deser(
20271        _version: MavlinkVersion,
20272        __input: &[u8],
20273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20274        let avail_len = __input.len();
20275        let mut payload_buf = [0; Self::ENCODED_LEN];
20276        let mut buf = if avail_len < Self::ENCODED_LEN {
20277            payload_buf[0..avail_len].copy_from_slice(__input);
20278            Bytes::new(&payload_buf)
20279        } else {
20280            Bytes::new(__input)
20281        };
20282        let mut __struct = Self::default();
20283        __struct.param1 = buf.get_f32_le();
20284        __struct.param2 = buf.get_f32_le();
20285        __struct.param3 = buf.get_f32_le();
20286        __struct.param4 = buf.get_f32_le();
20287        __struct.x = buf.get_i32_le();
20288        __struct.y = buf.get_i32_le();
20289        __struct.z = buf.get_f32_le();
20290        __struct.seq = buf.get_u16_le();
20291        let tmp = buf.get_u16_le();
20292        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20293            ::mavlink_core::error::ParserError::InvalidEnum {
20294                enum_type: "MavCmd",
20295                value: tmp as u32,
20296            },
20297        )?;
20298        __struct.target_system = buf.get_u8();
20299        __struct.target_component = buf.get_u8();
20300        let tmp = buf.get_u8();
20301        __struct.frame =
20302            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20303                enum_type: "MavFrame",
20304                value: tmp as u32,
20305            })?;
20306        __struct.current = buf.get_u8();
20307        __struct.autocontinue = buf.get_u8();
20308        let tmp = buf.get_u8();
20309        __struct.mission_type =
20310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20311                enum_type: "MavMissionType",
20312                value: tmp as u32,
20313            })?;
20314        Ok(__struct)
20315    }
20316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20317        let mut __tmp = BytesMut::new(bytes);
20318        #[allow(clippy::absurd_extreme_comparisons)]
20319        #[allow(unused_comparisons)]
20320        if __tmp.remaining() < Self::ENCODED_LEN {
20321            panic!(
20322                "buffer is too small (need {} bytes, but got {})",
20323                Self::ENCODED_LEN,
20324                __tmp.remaining(),
20325            )
20326        }
20327        __tmp.put_f32_le(self.param1);
20328        __tmp.put_f32_le(self.param2);
20329        __tmp.put_f32_le(self.param3);
20330        __tmp.put_f32_le(self.param4);
20331        __tmp.put_i32_le(self.x);
20332        __tmp.put_i32_le(self.y);
20333        __tmp.put_f32_le(self.z);
20334        __tmp.put_u16_le(self.seq);
20335        __tmp.put_u16_le(self.command as u16);
20336        __tmp.put_u8(self.target_system);
20337        __tmp.put_u8(self.target_component);
20338        __tmp.put_u8(self.frame as u8);
20339        __tmp.put_u8(self.current);
20340        __tmp.put_u8(self.autocontinue);
20341        if matches!(version, MavlinkVersion::V2) {
20342            __tmp.put_u8(self.mission_type as u8);
20343            let len = __tmp.len();
20344            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20345        } else {
20346            __tmp.len()
20347        }
20348    }
20349}
20350#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20351#[doc = ""]
20352#[doc = "ID: 46"]
20353#[derive(Debug, Clone, PartialEq)]
20354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20356#[cfg_attr(feature = "ts", derive(TS))]
20357#[cfg_attr(feature = "ts", ts(export))]
20358pub struct MISSION_ITEM_REACHED_DATA {
20359    #[doc = "Sequence"]
20360    pub seq: u16,
20361}
20362impl MISSION_ITEM_REACHED_DATA {
20363    pub const ENCODED_LEN: usize = 2usize;
20364    pub const DEFAULT: Self = Self { seq: 0_u16 };
20365    #[cfg(feature = "arbitrary")]
20366    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20367        use arbitrary::{Arbitrary, Unstructured};
20368        let mut buf = [0u8; 1024];
20369        rng.fill_bytes(&mut buf);
20370        let mut unstructured = Unstructured::new(&buf);
20371        Self::arbitrary(&mut unstructured).unwrap_or_default()
20372    }
20373}
20374impl Default for MISSION_ITEM_REACHED_DATA {
20375    fn default() -> Self {
20376        Self::DEFAULT.clone()
20377    }
20378}
20379impl MessageData for MISSION_ITEM_REACHED_DATA {
20380    type Message = MavMessage;
20381    const ID: u32 = 46u32;
20382    const NAME: &'static str = "MISSION_ITEM_REACHED";
20383    const EXTRA_CRC: u8 = 11u8;
20384    const ENCODED_LEN: usize = 2usize;
20385    fn deser(
20386        _version: MavlinkVersion,
20387        __input: &[u8],
20388    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20389        let avail_len = __input.len();
20390        let mut payload_buf = [0; Self::ENCODED_LEN];
20391        let mut buf = if avail_len < Self::ENCODED_LEN {
20392            payload_buf[0..avail_len].copy_from_slice(__input);
20393            Bytes::new(&payload_buf)
20394        } else {
20395            Bytes::new(__input)
20396        };
20397        let mut __struct = Self::default();
20398        __struct.seq = buf.get_u16_le();
20399        Ok(__struct)
20400    }
20401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20402        let mut __tmp = BytesMut::new(bytes);
20403        #[allow(clippy::absurd_extreme_comparisons)]
20404        #[allow(unused_comparisons)]
20405        if __tmp.remaining() < Self::ENCODED_LEN {
20406            panic!(
20407                "buffer is too small (need {} bytes, but got {})",
20408                Self::ENCODED_LEN,
20409                __tmp.remaining(),
20410            )
20411        }
20412        __tmp.put_u16_le(self.seq);
20413        if matches!(version, MavlinkVersion::V2) {
20414            let len = __tmp.len();
20415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20416        } else {
20417            __tmp.len()
20418        }
20419    }
20420}
20421#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20422#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20423#[doc = ""]
20424#[doc = "ID: 40"]
20425#[derive(Debug, Clone, PartialEq)]
20426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20428#[cfg_attr(feature = "ts", derive(TS))]
20429#[cfg_attr(feature = "ts", ts(export))]
20430pub struct MISSION_REQUEST_DATA {
20431    #[doc = "Sequence"]
20432    pub seq: u16,
20433    #[doc = "System ID"]
20434    pub target_system: u8,
20435    #[doc = "Component ID"]
20436    pub target_component: u8,
20437    #[doc = "Mission type."]
20438    #[cfg_attr(feature = "serde", serde(default))]
20439    pub mission_type: MavMissionType,
20440}
20441impl MISSION_REQUEST_DATA {
20442    pub const ENCODED_LEN: usize = 5usize;
20443    pub const DEFAULT: Self = Self {
20444        seq: 0_u16,
20445        target_system: 0_u8,
20446        target_component: 0_u8,
20447        mission_type: MavMissionType::DEFAULT,
20448    };
20449    #[cfg(feature = "arbitrary")]
20450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20451        use arbitrary::{Arbitrary, Unstructured};
20452        let mut buf = [0u8; 1024];
20453        rng.fill_bytes(&mut buf);
20454        let mut unstructured = Unstructured::new(&buf);
20455        Self::arbitrary(&mut unstructured).unwrap_or_default()
20456    }
20457}
20458impl Default for MISSION_REQUEST_DATA {
20459    fn default() -> Self {
20460        Self::DEFAULT.clone()
20461    }
20462}
20463impl MessageData for MISSION_REQUEST_DATA {
20464    type Message = MavMessage;
20465    const ID: u32 = 40u32;
20466    const NAME: &'static str = "MISSION_REQUEST";
20467    const EXTRA_CRC: u8 = 230u8;
20468    const ENCODED_LEN: usize = 5usize;
20469    fn deser(
20470        _version: MavlinkVersion,
20471        __input: &[u8],
20472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20473        let avail_len = __input.len();
20474        let mut payload_buf = [0; Self::ENCODED_LEN];
20475        let mut buf = if avail_len < Self::ENCODED_LEN {
20476            payload_buf[0..avail_len].copy_from_slice(__input);
20477            Bytes::new(&payload_buf)
20478        } else {
20479            Bytes::new(__input)
20480        };
20481        let mut __struct = Self::default();
20482        __struct.seq = buf.get_u16_le();
20483        __struct.target_system = buf.get_u8();
20484        __struct.target_component = buf.get_u8();
20485        let tmp = buf.get_u8();
20486        __struct.mission_type =
20487            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20488                enum_type: "MavMissionType",
20489                value: tmp as u32,
20490            })?;
20491        Ok(__struct)
20492    }
20493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20494        let mut __tmp = BytesMut::new(bytes);
20495        #[allow(clippy::absurd_extreme_comparisons)]
20496        #[allow(unused_comparisons)]
20497        if __tmp.remaining() < Self::ENCODED_LEN {
20498            panic!(
20499                "buffer is too small (need {} bytes, but got {})",
20500                Self::ENCODED_LEN,
20501                __tmp.remaining(),
20502            )
20503        }
20504        __tmp.put_u16_le(self.seq);
20505        __tmp.put_u8(self.target_system);
20506        __tmp.put_u8(self.target_component);
20507        if matches!(version, MavlinkVersion::V2) {
20508            __tmp.put_u8(self.mission_type as u8);
20509            let len = __tmp.len();
20510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20511        } else {
20512            __tmp.len()
20513        }
20514    }
20515}
20516#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20517#[doc = ""]
20518#[doc = "ID: 51"]
20519#[derive(Debug, Clone, PartialEq)]
20520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20522#[cfg_attr(feature = "ts", derive(TS))]
20523#[cfg_attr(feature = "ts", ts(export))]
20524pub struct MISSION_REQUEST_INT_DATA {
20525    #[doc = "Sequence"]
20526    pub seq: u16,
20527    #[doc = "System ID"]
20528    pub target_system: u8,
20529    #[doc = "Component ID"]
20530    pub target_component: u8,
20531    #[doc = "Mission type."]
20532    #[cfg_attr(feature = "serde", serde(default))]
20533    pub mission_type: MavMissionType,
20534}
20535impl MISSION_REQUEST_INT_DATA {
20536    pub const ENCODED_LEN: usize = 5usize;
20537    pub const DEFAULT: Self = Self {
20538        seq: 0_u16,
20539        target_system: 0_u8,
20540        target_component: 0_u8,
20541        mission_type: MavMissionType::DEFAULT,
20542    };
20543    #[cfg(feature = "arbitrary")]
20544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20545        use arbitrary::{Arbitrary, Unstructured};
20546        let mut buf = [0u8; 1024];
20547        rng.fill_bytes(&mut buf);
20548        let mut unstructured = Unstructured::new(&buf);
20549        Self::arbitrary(&mut unstructured).unwrap_or_default()
20550    }
20551}
20552impl Default for MISSION_REQUEST_INT_DATA {
20553    fn default() -> Self {
20554        Self::DEFAULT.clone()
20555    }
20556}
20557impl MessageData for MISSION_REQUEST_INT_DATA {
20558    type Message = MavMessage;
20559    const ID: u32 = 51u32;
20560    const NAME: &'static str = "MISSION_REQUEST_INT";
20561    const EXTRA_CRC: u8 = 196u8;
20562    const ENCODED_LEN: usize = 5usize;
20563    fn deser(
20564        _version: MavlinkVersion,
20565        __input: &[u8],
20566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20567        let avail_len = __input.len();
20568        let mut payload_buf = [0; Self::ENCODED_LEN];
20569        let mut buf = if avail_len < Self::ENCODED_LEN {
20570            payload_buf[0..avail_len].copy_from_slice(__input);
20571            Bytes::new(&payload_buf)
20572        } else {
20573            Bytes::new(__input)
20574        };
20575        let mut __struct = Self::default();
20576        __struct.seq = buf.get_u16_le();
20577        __struct.target_system = buf.get_u8();
20578        __struct.target_component = buf.get_u8();
20579        let tmp = buf.get_u8();
20580        __struct.mission_type =
20581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20582                enum_type: "MavMissionType",
20583                value: tmp as u32,
20584            })?;
20585        Ok(__struct)
20586    }
20587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20588        let mut __tmp = BytesMut::new(bytes);
20589        #[allow(clippy::absurd_extreme_comparisons)]
20590        #[allow(unused_comparisons)]
20591        if __tmp.remaining() < Self::ENCODED_LEN {
20592            panic!(
20593                "buffer is too small (need {} bytes, but got {})",
20594                Self::ENCODED_LEN,
20595                __tmp.remaining(),
20596            )
20597        }
20598        __tmp.put_u16_le(self.seq);
20599        __tmp.put_u8(self.target_system);
20600        __tmp.put_u8(self.target_component);
20601        if matches!(version, MavlinkVersion::V2) {
20602            __tmp.put_u8(self.mission_type as u8);
20603            let len = __tmp.len();
20604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20605        } else {
20606            __tmp.len()
20607        }
20608    }
20609}
20610#[doc = "Request the overall list of mission items from the system/component."]
20611#[doc = ""]
20612#[doc = "ID: 43"]
20613#[derive(Debug, Clone, PartialEq)]
20614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20616#[cfg_attr(feature = "ts", derive(TS))]
20617#[cfg_attr(feature = "ts", ts(export))]
20618pub struct MISSION_REQUEST_LIST_DATA {
20619    #[doc = "System ID"]
20620    pub target_system: u8,
20621    #[doc = "Component ID"]
20622    pub target_component: u8,
20623    #[doc = "Mission type."]
20624    #[cfg_attr(feature = "serde", serde(default))]
20625    pub mission_type: MavMissionType,
20626}
20627impl MISSION_REQUEST_LIST_DATA {
20628    pub const ENCODED_LEN: usize = 3usize;
20629    pub const DEFAULT: Self = Self {
20630        target_system: 0_u8,
20631        target_component: 0_u8,
20632        mission_type: MavMissionType::DEFAULT,
20633    };
20634    #[cfg(feature = "arbitrary")]
20635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20636        use arbitrary::{Arbitrary, Unstructured};
20637        let mut buf = [0u8; 1024];
20638        rng.fill_bytes(&mut buf);
20639        let mut unstructured = Unstructured::new(&buf);
20640        Self::arbitrary(&mut unstructured).unwrap_or_default()
20641    }
20642}
20643impl Default for MISSION_REQUEST_LIST_DATA {
20644    fn default() -> Self {
20645        Self::DEFAULT.clone()
20646    }
20647}
20648impl MessageData for MISSION_REQUEST_LIST_DATA {
20649    type Message = MavMessage;
20650    const ID: u32 = 43u32;
20651    const NAME: &'static str = "MISSION_REQUEST_LIST";
20652    const EXTRA_CRC: u8 = 132u8;
20653    const ENCODED_LEN: usize = 3usize;
20654    fn deser(
20655        _version: MavlinkVersion,
20656        __input: &[u8],
20657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20658        let avail_len = __input.len();
20659        let mut payload_buf = [0; Self::ENCODED_LEN];
20660        let mut buf = if avail_len < Self::ENCODED_LEN {
20661            payload_buf[0..avail_len].copy_from_slice(__input);
20662            Bytes::new(&payload_buf)
20663        } else {
20664            Bytes::new(__input)
20665        };
20666        let mut __struct = Self::default();
20667        __struct.target_system = buf.get_u8();
20668        __struct.target_component = buf.get_u8();
20669        let tmp = buf.get_u8();
20670        __struct.mission_type =
20671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20672                enum_type: "MavMissionType",
20673                value: tmp as u32,
20674            })?;
20675        Ok(__struct)
20676    }
20677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20678        let mut __tmp = BytesMut::new(bytes);
20679        #[allow(clippy::absurd_extreme_comparisons)]
20680        #[allow(unused_comparisons)]
20681        if __tmp.remaining() < Self::ENCODED_LEN {
20682            panic!(
20683                "buffer is too small (need {} bytes, but got {})",
20684                Self::ENCODED_LEN,
20685                __tmp.remaining(),
20686            )
20687        }
20688        __tmp.put_u8(self.target_system);
20689        __tmp.put_u8(self.target_component);
20690        if matches!(version, MavlinkVersion::V2) {
20691            __tmp.put_u8(self.mission_type as u8);
20692            let len = __tmp.len();
20693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20694        } else {
20695            __tmp.len()
20696        }
20697    }
20698}
20699#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20700#[doc = ""]
20701#[doc = "ID: 37"]
20702#[derive(Debug, Clone, PartialEq)]
20703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20705#[cfg_attr(feature = "ts", derive(TS))]
20706#[cfg_attr(feature = "ts", ts(export))]
20707pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20708    #[doc = "Start index"]
20709    pub start_index: i16,
20710    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20711    pub end_index: i16,
20712    #[doc = "System ID"]
20713    pub target_system: u8,
20714    #[doc = "Component ID"]
20715    pub target_component: u8,
20716    #[doc = "Mission type."]
20717    #[cfg_attr(feature = "serde", serde(default))]
20718    pub mission_type: MavMissionType,
20719}
20720impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20721    pub const ENCODED_LEN: usize = 7usize;
20722    pub const DEFAULT: Self = Self {
20723        start_index: 0_i16,
20724        end_index: 0_i16,
20725        target_system: 0_u8,
20726        target_component: 0_u8,
20727        mission_type: MavMissionType::DEFAULT,
20728    };
20729    #[cfg(feature = "arbitrary")]
20730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20731        use arbitrary::{Arbitrary, Unstructured};
20732        let mut buf = [0u8; 1024];
20733        rng.fill_bytes(&mut buf);
20734        let mut unstructured = Unstructured::new(&buf);
20735        Self::arbitrary(&mut unstructured).unwrap_or_default()
20736    }
20737}
20738impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20739    fn default() -> Self {
20740        Self::DEFAULT.clone()
20741    }
20742}
20743impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20744    type Message = MavMessage;
20745    const ID: u32 = 37u32;
20746    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20747    const EXTRA_CRC: u8 = 212u8;
20748    const ENCODED_LEN: usize = 7usize;
20749    fn deser(
20750        _version: MavlinkVersion,
20751        __input: &[u8],
20752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20753        let avail_len = __input.len();
20754        let mut payload_buf = [0; Self::ENCODED_LEN];
20755        let mut buf = if avail_len < Self::ENCODED_LEN {
20756            payload_buf[0..avail_len].copy_from_slice(__input);
20757            Bytes::new(&payload_buf)
20758        } else {
20759            Bytes::new(__input)
20760        };
20761        let mut __struct = Self::default();
20762        __struct.start_index = buf.get_i16_le();
20763        __struct.end_index = buf.get_i16_le();
20764        __struct.target_system = buf.get_u8();
20765        __struct.target_component = buf.get_u8();
20766        let tmp = buf.get_u8();
20767        __struct.mission_type =
20768            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20769                enum_type: "MavMissionType",
20770                value: tmp as u32,
20771            })?;
20772        Ok(__struct)
20773    }
20774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20775        let mut __tmp = BytesMut::new(bytes);
20776        #[allow(clippy::absurd_extreme_comparisons)]
20777        #[allow(unused_comparisons)]
20778        if __tmp.remaining() < Self::ENCODED_LEN {
20779            panic!(
20780                "buffer is too small (need {} bytes, but got {})",
20781                Self::ENCODED_LEN,
20782                __tmp.remaining(),
20783            )
20784        }
20785        __tmp.put_i16_le(self.start_index);
20786        __tmp.put_i16_le(self.end_index);
20787        __tmp.put_u8(self.target_system);
20788        __tmp.put_u8(self.target_component);
20789        if matches!(version, MavlinkVersion::V2) {
20790            __tmp.put_u8(self.mission_type as u8);
20791            let len = __tmp.len();
20792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20793        } else {
20794            __tmp.len()
20795        }
20796    }
20797}
20798#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20799#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20800#[doc = ""]
20801#[doc = "ID: 41"]
20802#[derive(Debug, Clone, PartialEq)]
20803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20805#[cfg_attr(feature = "ts", derive(TS))]
20806#[cfg_attr(feature = "ts", ts(export))]
20807pub struct MISSION_SET_CURRENT_DATA {
20808    #[doc = "Sequence"]
20809    pub seq: u16,
20810    #[doc = "System ID"]
20811    pub target_system: u8,
20812    #[doc = "Component ID"]
20813    pub target_component: u8,
20814}
20815impl MISSION_SET_CURRENT_DATA {
20816    pub const ENCODED_LEN: usize = 4usize;
20817    pub const DEFAULT: Self = Self {
20818        seq: 0_u16,
20819        target_system: 0_u8,
20820        target_component: 0_u8,
20821    };
20822    #[cfg(feature = "arbitrary")]
20823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20824        use arbitrary::{Arbitrary, Unstructured};
20825        let mut buf = [0u8; 1024];
20826        rng.fill_bytes(&mut buf);
20827        let mut unstructured = Unstructured::new(&buf);
20828        Self::arbitrary(&mut unstructured).unwrap_or_default()
20829    }
20830}
20831impl Default for MISSION_SET_CURRENT_DATA {
20832    fn default() -> Self {
20833        Self::DEFAULT.clone()
20834    }
20835}
20836impl MessageData for MISSION_SET_CURRENT_DATA {
20837    type Message = MavMessage;
20838    const ID: u32 = 41u32;
20839    const NAME: &'static str = "MISSION_SET_CURRENT";
20840    const EXTRA_CRC: u8 = 28u8;
20841    const ENCODED_LEN: usize = 4usize;
20842    fn deser(
20843        _version: MavlinkVersion,
20844        __input: &[u8],
20845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20846        let avail_len = __input.len();
20847        let mut payload_buf = [0; Self::ENCODED_LEN];
20848        let mut buf = if avail_len < Self::ENCODED_LEN {
20849            payload_buf[0..avail_len].copy_from_slice(__input);
20850            Bytes::new(&payload_buf)
20851        } else {
20852            Bytes::new(__input)
20853        };
20854        let mut __struct = Self::default();
20855        __struct.seq = buf.get_u16_le();
20856        __struct.target_system = buf.get_u8();
20857        __struct.target_component = buf.get_u8();
20858        Ok(__struct)
20859    }
20860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20861        let mut __tmp = BytesMut::new(bytes);
20862        #[allow(clippy::absurd_extreme_comparisons)]
20863        #[allow(unused_comparisons)]
20864        if __tmp.remaining() < Self::ENCODED_LEN {
20865            panic!(
20866                "buffer is too small (need {} bytes, but got {})",
20867                Self::ENCODED_LEN,
20868                __tmp.remaining(),
20869            )
20870        }
20871        __tmp.put_u16_le(self.seq);
20872        __tmp.put_u8(self.target_system);
20873        __tmp.put_u8(self.target_component);
20874        if matches!(version, MavlinkVersion::V2) {
20875            let len = __tmp.len();
20876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20877        } else {
20878            __tmp.len()
20879        }
20880    }
20881}
20882#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20883#[doc = ""]
20884#[doc = "ID: 38"]
20885#[derive(Debug, Clone, PartialEq)]
20886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20888#[cfg_attr(feature = "ts", derive(TS))]
20889#[cfg_attr(feature = "ts", ts(export))]
20890pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20891    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20892    pub start_index: i16,
20893    #[doc = "End index, equal or greater than start index."]
20894    pub end_index: i16,
20895    #[doc = "System ID"]
20896    pub target_system: u8,
20897    #[doc = "Component ID"]
20898    pub target_component: u8,
20899    #[doc = "Mission type."]
20900    #[cfg_attr(feature = "serde", serde(default))]
20901    pub mission_type: MavMissionType,
20902}
20903impl MISSION_WRITE_PARTIAL_LIST_DATA {
20904    pub const ENCODED_LEN: usize = 7usize;
20905    pub const DEFAULT: Self = Self {
20906        start_index: 0_i16,
20907        end_index: 0_i16,
20908        target_system: 0_u8,
20909        target_component: 0_u8,
20910        mission_type: MavMissionType::DEFAULT,
20911    };
20912    #[cfg(feature = "arbitrary")]
20913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20914        use arbitrary::{Arbitrary, Unstructured};
20915        let mut buf = [0u8; 1024];
20916        rng.fill_bytes(&mut buf);
20917        let mut unstructured = Unstructured::new(&buf);
20918        Self::arbitrary(&mut unstructured).unwrap_or_default()
20919    }
20920}
20921impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20922    fn default() -> Self {
20923        Self::DEFAULT.clone()
20924    }
20925}
20926impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20927    type Message = MavMessage;
20928    const ID: u32 = 38u32;
20929    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20930    const EXTRA_CRC: u8 = 9u8;
20931    const ENCODED_LEN: usize = 7usize;
20932    fn deser(
20933        _version: MavlinkVersion,
20934        __input: &[u8],
20935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20936        let avail_len = __input.len();
20937        let mut payload_buf = [0; Self::ENCODED_LEN];
20938        let mut buf = if avail_len < Self::ENCODED_LEN {
20939            payload_buf[0..avail_len].copy_from_slice(__input);
20940            Bytes::new(&payload_buf)
20941        } else {
20942            Bytes::new(__input)
20943        };
20944        let mut __struct = Self::default();
20945        __struct.start_index = buf.get_i16_le();
20946        __struct.end_index = buf.get_i16_le();
20947        __struct.target_system = buf.get_u8();
20948        __struct.target_component = buf.get_u8();
20949        let tmp = buf.get_u8();
20950        __struct.mission_type =
20951            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20952                enum_type: "MavMissionType",
20953                value: tmp as u32,
20954            })?;
20955        Ok(__struct)
20956    }
20957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20958        let mut __tmp = BytesMut::new(bytes);
20959        #[allow(clippy::absurd_extreme_comparisons)]
20960        #[allow(unused_comparisons)]
20961        if __tmp.remaining() < Self::ENCODED_LEN {
20962            panic!(
20963                "buffer is too small (need {} bytes, but got {})",
20964                Self::ENCODED_LEN,
20965                __tmp.remaining(),
20966            )
20967        }
20968        __tmp.put_i16_le(self.start_index);
20969        __tmp.put_i16_le(self.end_index);
20970        __tmp.put_u8(self.target_system);
20971        __tmp.put_u8(self.target_component);
20972        if matches!(version, MavlinkVersion::V2) {
20973            __tmp.put_u8(self.mission_type as u8);
20974            let len = __tmp.len();
20975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20976        } else {
20977            __tmp.len()
20978        }
20979    }
20980}
20981#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20982#[doc = "Orientation of a mount."]
20983#[doc = ""]
20984#[doc = "ID: 265"]
20985#[derive(Debug, Clone, PartialEq)]
20986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20988#[cfg_attr(feature = "ts", derive(TS))]
20989#[cfg_attr(feature = "ts", ts(export))]
20990pub struct MOUNT_ORIENTATION_DATA {
20991    #[doc = "Timestamp (time since system boot)."]
20992    pub time_boot_ms: u32,
20993    #[doc = "Roll in global frame (set to NaN for invalid)."]
20994    pub roll: f32,
20995    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20996    pub pitch: f32,
20997    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20998    pub yaw: f32,
20999    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21001    pub yaw_absolute: f32,
21002}
21003impl MOUNT_ORIENTATION_DATA {
21004    pub const ENCODED_LEN: usize = 20usize;
21005    pub const DEFAULT: Self = Self {
21006        time_boot_ms: 0_u32,
21007        roll: 0.0_f32,
21008        pitch: 0.0_f32,
21009        yaw: 0.0_f32,
21010        yaw_absolute: 0.0_f32,
21011    };
21012    #[cfg(feature = "arbitrary")]
21013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21014        use arbitrary::{Arbitrary, Unstructured};
21015        let mut buf = [0u8; 1024];
21016        rng.fill_bytes(&mut buf);
21017        let mut unstructured = Unstructured::new(&buf);
21018        Self::arbitrary(&mut unstructured).unwrap_or_default()
21019    }
21020}
21021impl Default for MOUNT_ORIENTATION_DATA {
21022    fn default() -> Self {
21023        Self::DEFAULT.clone()
21024    }
21025}
21026impl MessageData for MOUNT_ORIENTATION_DATA {
21027    type Message = MavMessage;
21028    const ID: u32 = 265u32;
21029    const NAME: &'static str = "MOUNT_ORIENTATION";
21030    const EXTRA_CRC: u8 = 26u8;
21031    const ENCODED_LEN: usize = 20usize;
21032    fn deser(
21033        _version: MavlinkVersion,
21034        __input: &[u8],
21035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21036        let avail_len = __input.len();
21037        let mut payload_buf = [0; Self::ENCODED_LEN];
21038        let mut buf = if avail_len < Self::ENCODED_LEN {
21039            payload_buf[0..avail_len].copy_from_slice(__input);
21040            Bytes::new(&payload_buf)
21041        } else {
21042            Bytes::new(__input)
21043        };
21044        let mut __struct = Self::default();
21045        __struct.time_boot_ms = buf.get_u32_le();
21046        __struct.roll = buf.get_f32_le();
21047        __struct.pitch = buf.get_f32_le();
21048        __struct.yaw = buf.get_f32_le();
21049        __struct.yaw_absolute = buf.get_f32_le();
21050        Ok(__struct)
21051    }
21052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21053        let mut __tmp = BytesMut::new(bytes);
21054        #[allow(clippy::absurd_extreme_comparisons)]
21055        #[allow(unused_comparisons)]
21056        if __tmp.remaining() < Self::ENCODED_LEN {
21057            panic!(
21058                "buffer is too small (need {} bytes, but got {})",
21059                Self::ENCODED_LEN,
21060                __tmp.remaining(),
21061            )
21062        }
21063        __tmp.put_u32_le(self.time_boot_ms);
21064        __tmp.put_f32_le(self.roll);
21065        __tmp.put_f32_le(self.pitch);
21066        __tmp.put_f32_le(self.yaw);
21067        if matches!(version, MavlinkVersion::V2) {
21068            __tmp.put_f32_le(self.yaw_absolute);
21069            let len = __tmp.len();
21070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21071        } else {
21072            __tmp.len()
21073        }
21074    }
21075}
21076#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21077#[doc = ""]
21078#[doc = "ID: 251"]
21079#[derive(Debug, Clone, PartialEq)]
21080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21082#[cfg_attr(feature = "ts", derive(TS))]
21083#[cfg_attr(feature = "ts", ts(export))]
21084pub struct NAMED_VALUE_FLOAT_DATA {
21085    #[doc = "Timestamp (time since system boot)."]
21086    pub time_boot_ms: u32,
21087    #[doc = "Floating point value"]
21088    pub value: f32,
21089    #[doc = "Name of the debug variable"]
21090    #[cfg_attr(feature = "ts", ts(type = "string"))]
21091    pub name: CharArray<10>,
21092}
21093impl NAMED_VALUE_FLOAT_DATA {
21094    pub const ENCODED_LEN: usize = 18usize;
21095    pub const DEFAULT: Self = Self {
21096        time_boot_ms: 0_u32,
21097        value: 0.0_f32,
21098        name: CharArray::new([0_u8; 10usize]),
21099    };
21100    #[cfg(feature = "arbitrary")]
21101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21102        use arbitrary::{Arbitrary, Unstructured};
21103        let mut buf = [0u8; 1024];
21104        rng.fill_bytes(&mut buf);
21105        let mut unstructured = Unstructured::new(&buf);
21106        Self::arbitrary(&mut unstructured).unwrap_or_default()
21107    }
21108}
21109impl Default for NAMED_VALUE_FLOAT_DATA {
21110    fn default() -> Self {
21111        Self::DEFAULT.clone()
21112    }
21113}
21114impl MessageData for NAMED_VALUE_FLOAT_DATA {
21115    type Message = MavMessage;
21116    const ID: u32 = 251u32;
21117    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21118    const EXTRA_CRC: u8 = 170u8;
21119    const ENCODED_LEN: usize = 18usize;
21120    fn deser(
21121        _version: MavlinkVersion,
21122        __input: &[u8],
21123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21124        let avail_len = __input.len();
21125        let mut payload_buf = [0; Self::ENCODED_LEN];
21126        let mut buf = if avail_len < Self::ENCODED_LEN {
21127            payload_buf[0..avail_len].copy_from_slice(__input);
21128            Bytes::new(&payload_buf)
21129        } else {
21130            Bytes::new(__input)
21131        };
21132        let mut __struct = Self::default();
21133        __struct.time_boot_ms = buf.get_u32_le();
21134        __struct.value = buf.get_f32_le();
21135        let mut tmp = [0_u8; 10usize];
21136        for v in &mut tmp {
21137            *v = buf.get_u8();
21138        }
21139        __struct.name = CharArray::new(tmp);
21140        Ok(__struct)
21141    }
21142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21143        let mut __tmp = BytesMut::new(bytes);
21144        #[allow(clippy::absurd_extreme_comparisons)]
21145        #[allow(unused_comparisons)]
21146        if __tmp.remaining() < Self::ENCODED_LEN {
21147            panic!(
21148                "buffer is too small (need {} bytes, but got {})",
21149                Self::ENCODED_LEN,
21150                __tmp.remaining(),
21151            )
21152        }
21153        __tmp.put_u32_le(self.time_boot_ms);
21154        __tmp.put_f32_le(self.value);
21155        for val in &self.name {
21156            __tmp.put_u8(*val);
21157        }
21158        if matches!(version, MavlinkVersion::V2) {
21159            let len = __tmp.len();
21160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21161        } else {
21162            __tmp.len()
21163        }
21164    }
21165}
21166#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21167#[doc = ""]
21168#[doc = "ID: 252"]
21169#[derive(Debug, Clone, PartialEq)]
21170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21172#[cfg_attr(feature = "ts", derive(TS))]
21173#[cfg_attr(feature = "ts", ts(export))]
21174pub struct NAMED_VALUE_INT_DATA {
21175    #[doc = "Timestamp (time since system boot)."]
21176    pub time_boot_ms: u32,
21177    #[doc = "Signed integer value"]
21178    pub value: i32,
21179    #[doc = "Name of the debug variable"]
21180    #[cfg_attr(feature = "ts", ts(type = "string"))]
21181    pub name: CharArray<10>,
21182}
21183impl NAMED_VALUE_INT_DATA {
21184    pub const ENCODED_LEN: usize = 18usize;
21185    pub const DEFAULT: Self = Self {
21186        time_boot_ms: 0_u32,
21187        value: 0_i32,
21188        name: CharArray::new([0_u8; 10usize]),
21189    };
21190    #[cfg(feature = "arbitrary")]
21191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21192        use arbitrary::{Arbitrary, Unstructured};
21193        let mut buf = [0u8; 1024];
21194        rng.fill_bytes(&mut buf);
21195        let mut unstructured = Unstructured::new(&buf);
21196        Self::arbitrary(&mut unstructured).unwrap_or_default()
21197    }
21198}
21199impl Default for NAMED_VALUE_INT_DATA {
21200    fn default() -> Self {
21201        Self::DEFAULT.clone()
21202    }
21203}
21204impl MessageData for NAMED_VALUE_INT_DATA {
21205    type Message = MavMessage;
21206    const ID: u32 = 252u32;
21207    const NAME: &'static str = "NAMED_VALUE_INT";
21208    const EXTRA_CRC: u8 = 44u8;
21209    const ENCODED_LEN: usize = 18usize;
21210    fn deser(
21211        _version: MavlinkVersion,
21212        __input: &[u8],
21213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21214        let avail_len = __input.len();
21215        let mut payload_buf = [0; Self::ENCODED_LEN];
21216        let mut buf = if avail_len < Self::ENCODED_LEN {
21217            payload_buf[0..avail_len].copy_from_slice(__input);
21218            Bytes::new(&payload_buf)
21219        } else {
21220            Bytes::new(__input)
21221        };
21222        let mut __struct = Self::default();
21223        __struct.time_boot_ms = buf.get_u32_le();
21224        __struct.value = buf.get_i32_le();
21225        let mut tmp = [0_u8; 10usize];
21226        for v in &mut tmp {
21227            *v = buf.get_u8();
21228        }
21229        __struct.name = CharArray::new(tmp);
21230        Ok(__struct)
21231    }
21232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21233        let mut __tmp = BytesMut::new(bytes);
21234        #[allow(clippy::absurd_extreme_comparisons)]
21235        #[allow(unused_comparisons)]
21236        if __tmp.remaining() < Self::ENCODED_LEN {
21237            panic!(
21238                "buffer is too small (need {} bytes, but got {})",
21239                Self::ENCODED_LEN,
21240                __tmp.remaining(),
21241            )
21242        }
21243        __tmp.put_u32_le(self.time_boot_ms);
21244        __tmp.put_i32_le(self.value);
21245        for val in &self.name {
21246            __tmp.put_u8(*val);
21247        }
21248        if matches!(version, MavlinkVersion::V2) {
21249            let len = __tmp.len();
21250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21251        } else {
21252            __tmp.len()
21253        }
21254    }
21255}
21256#[doc = "The state of the navigation and position controller."]
21257#[doc = ""]
21258#[doc = "ID: 62"]
21259#[derive(Debug, Clone, PartialEq)]
21260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21262#[cfg_attr(feature = "ts", derive(TS))]
21263#[cfg_attr(feature = "ts", ts(export))]
21264pub struct NAV_CONTROLLER_OUTPUT_DATA {
21265    #[doc = "Current desired roll"]
21266    pub nav_roll: f32,
21267    #[doc = "Current desired pitch"]
21268    pub nav_pitch: f32,
21269    #[doc = "Current altitude error"]
21270    pub alt_error: f32,
21271    #[doc = "Current airspeed error"]
21272    pub aspd_error: f32,
21273    #[doc = "Current crosstrack error on x-y plane"]
21274    pub xtrack_error: f32,
21275    #[doc = "Current desired heading"]
21276    pub nav_bearing: i16,
21277    #[doc = "Bearing to current waypoint/target"]
21278    pub target_bearing: i16,
21279    #[doc = "Distance to active waypoint"]
21280    pub wp_dist: u16,
21281}
21282impl NAV_CONTROLLER_OUTPUT_DATA {
21283    pub const ENCODED_LEN: usize = 26usize;
21284    pub const DEFAULT: Self = Self {
21285        nav_roll: 0.0_f32,
21286        nav_pitch: 0.0_f32,
21287        alt_error: 0.0_f32,
21288        aspd_error: 0.0_f32,
21289        xtrack_error: 0.0_f32,
21290        nav_bearing: 0_i16,
21291        target_bearing: 0_i16,
21292        wp_dist: 0_u16,
21293    };
21294    #[cfg(feature = "arbitrary")]
21295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21296        use arbitrary::{Arbitrary, Unstructured};
21297        let mut buf = [0u8; 1024];
21298        rng.fill_bytes(&mut buf);
21299        let mut unstructured = Unstructured::new(&buf);
21300        Self::arbitrary(&mut unstructured).unwrap_or_default()
21301    }
21302}
21303impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21304    fn default() -> Self {
21305        Self::DEFAULT.clone()
21306    }
21307}
21308impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21309    type Message = MavMessage;
21310    const ID: u32 = 62u32;
21311    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21312    const EXTRA_CRC: u8 = 183u8;
21313    const ENCODED_LEN: usize = 26usize;
21314    fn deser(
21315        _version: MavlinkVersion,
21316        __input: &[u8],
21317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21318        let avail_len = __input.len();
21319        let mut payload_buf = [0; Self::ENCODED_LEN];
21320        let mut buf = if avail_len < Self::ENCODED_LEN {
21321            payload_buf[0..avail_len].copy_from_slice(__input);
21322            Bytes::new(&payload_buf)
21323        } else {
21324            Bytes::new(__input)
21325        };
21326        let mut __struct = Self::default();
21327        __struct.nav_roll = buf.get_f32_le();
21328        __struct.nav_pitch = buf.get_f32_le();
21329        __struct.alt_error = buf.get_f32_le();
21330        __struct.aspd_error = buf.get_f32_le();
21331        __struct.xtrack_error = buf.get_f32_le();
21332        __struct.nav_bearing = buf.get_i16_le();
21333        __struct.target_bearing = buf.get_i16_le();
21334        __struct.wp_dist = buf.get_u16_le();
21335        Ok(__struct)
21336    }
21337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21338        let mut __tmp = BytesMut::new(bytes);
21339        #[allow(clippy::absurd_extreme_comparisons)]
21340        #[allow(unused_comparisons)]
21341        if __tmp.remaining() < Self::ENCODED_LEN {
21342            panic!(
21343                "buffer is too small (need {} bytes, but got {})",
21344                Self::ENCODED_LEN,
21345                __tmp.remaining(),
21346            )
21347        }
21348        __tmp.put_f32_le(self.nav_roll);
21349        __tmp.put_f32_le(self.nav_pitch);
21350        __tmp.put_f32_le(self.alt_error);
21351        __tmp.put_f32_le(self.aspd_error);
21352        __tmp.put_f32_le(self.xtrack_error);
21353        __tmp.put_i16_le(self.nav_bearing);
21354        __tmp.put_i16_le(self.target_bearing);
21355        __tmp.put_u16_le(self.wp_dist);
21356        if matches!(version, MavlinkVersion::V2) {
21357            let len = __tmp.len();
21358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21359        } else {
21360            __tmp.len()
21361        }
21362    }
21363}
21364#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21365#[doc = ""]
21366#[doc = "ID: 330"]
21367#[derive(Debug, Clone, PartialEq)]
21368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21370#[cfg_attr(feature = "ts", derive(TS))]
21371#[cfg_attr(feature = "ts", ts(export))]
21372pub struct OBSTACLE_DISTANCE_DATA {
21373    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21374    pub time_usec: u64,
21375    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21377    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21378    pub distances: [u16; 72],
21379    #[doc = "Minimum distance the sensor can measure."]
21380    pub min_distance: u16,
21381    #[doc = "Maximum distance the sensor can measure."]
21382    pub max_distance: u16,
21383    #[doc = "Class id of the distance sensor type."]
21384    pub sensor_type: MavDistanceSensor,
21385    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21386    pub increment: u8,
21387    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21389    pub increment_f: f32,
21390    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21392    pub angle_offset: f32,
21393    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21394    #[cfg_attr(feature = "serde", serde(default))]
21395    pub frame: MavFrame,
21396}
21397impl OBSTACLE_DISTANCE_DATA {
21398    pub const ENCODED_LEN: usize = 167usize;
21399    pub const DEFAULT: Self = Self {
21400        time_usec: 0_u64,
21401        distances: [0_u16; 72usize],
21402        min_distance: 0_u16,
21403        max_distance: 0_u16,
21404        sensor_type: MavDistanceSensor::DEFAULT,
21405        increment: 0_u8,
21406        increment_f: 0.0_f32,
21407        angle_offset: 0.0_f32,
21408        frame: MavFrame::DEFAULT,
21409    };
21410    #[cfg(feature = "arbitrary")]
21411    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21412        use arbitrary::{Arbitrary, Unstructured};
21413        let mut buf = [0u8; 1024];
21414        rng.fill_bytes(&mut buf);
21415        let mut unstructured = Unstructured::new(&buf);
21416        Self::arbitrary(&mut unstructured).unwrap_or_default()
21417    }
21418}
21419impl Default for OBSTACLE_DISTANCE_DATA {
21420    fn default() -> Self {
21421        Self::DEFAULT.clone()
21422    }
21423}
21424impl MessageData for OBSTACLE_DISTANCE_DATA {
21425    type Message = MavMessage;
21426    const ID: u32 = 330u32;
21427    const NAME: &'static str = "OBSTACLE_DISTANCE";
21428    const EXTRA_CRC: u8 = 23u8;
21429    const ENCODED_LEN: usize = 167usize;
21430    fn deser(
21431        _version: MavlinkVersion,
21432        __input: &[u8],
21433    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21434        let avail_len = __input.len();
21435        let mut payload_buf = [0; Self::ENCODED_LEN];
21436        let mut buf = if avail_len < Self::ENCODED_LEN {
21437            payload_buf[0..avail_len].copy_from_slice(__input);
21438            Bytes::new(&payload_buf)
21439        } else {
21440            Bytes::new(__input)
21441        };
21442        let mut __struct = Self::default();
21443        __struct.time_usec = buf.get_u64_le();
21444        for v in &mut __struct.distances {
21445            let val = buf.get_u16_le();
21446            *v = val;
21447        }
21448        __struct.min_distance = buf.get_u16_le();
21449        __struct.max_distance = buf.get_u16_le();
21450        let tmp = buf.get_u8();
21451        __struct.sensor_type =
21452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21453                enum_type: "MavDistanceSensor",
21454                value: tmp as u32,
21455            })?;
21456        __struct.increment = buf.get_u8();
21457        __struct.increment_f = buf.get_f32_le();
21458        __struct.angle_offset = buf.get_f32_le();
21459        let tmp = buf.get_u8();
21460        __struct.frame =
21461            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21462                enum_type: "MavFrame",
21463                value: tmp as u32,
21464            })?;
21465        Ok(__struct)
21466    }
21467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21468        let mut __tmp = BytesMut::new(bytes);
21469        #[allow(clippy::absurd_extreme_comparisons)]
21470        #[allow(unused_comparisons)]
21471        if __tmp.remaining() < Self::ENCODED_LEN {
21472            panic!(
21473                "buffer is too small (need {} bytes, but got {})",
21474                Self::ENCODED_LEN,
21475                __tmp.remaining(),
21476            )
21477        }
21478        __tmp.put_u64_le(self.time_usec);
21479        for val in &self.distances {
21480            __tmp.put_u16_le(*val);
21481        }
21482        __tmp.put_u16_le(self.min_distance);
21483        __tmp.put_u16_le(self.max_distance);
21484        __tmp.put_u8(self.sensor_type as u8);
21485        __tmp.put_u8(self.increment);
21486        if matches!(version, MavlinkVersion::V2) {
21487            __tmp.put_f32_le(self.increment_f);
21488            __tmp.put_f32_le(self.angle_offset);
21489            __tmp.put_u8(self.frame as u8);
21490            let len = __tmp.len();
21491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21492        } else {
21493            __tmp.len()
21494        }
21495    }
21496}
21497#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21498#[doc = ""]
21499#[doc = "ID: 331"]
21500#[derive(Debug, Clone, PartialEq)]
21501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21503#[cfg_attr(feature = "ts", derive(TS))]
21504#[cfg_attr(feature = "ts", ts(export))]
21505pub struct ODOMETRY_DATA {
21506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21507    pub time_usec: u64,
21508    #[doc = "X Position"]
21509    pub x: f32,
21510    #[doc = "Y Position"]
21511    pub y: f32,
21512    #[doc = "Z Position"]
21513    pub z: f32,
21514    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21515    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21516    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21517    pub q: [f32; 4],
21518    #[doc = "X linear speed"]
21519    pub vx: f32,
21520    #[doc = "Y linear speed"]
21521    pub vy: f32,
21522    #[doc = "Z linear speed"]
21523    pub vz: f32,
21524    #[doc = "Roll angular speed"]
21525    pub rollspeed: f32,
21526    #[doc = "Pitch angular speed"]
21527    pub pitchspeed: f32,
21528    #[doc = "Yaw angular speed"]
21529    pub yawspeed: f32,
21530    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21533    pub pose_covariance: [f32; 21],
21534    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21535    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21536    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21537    pub velocity_covariance: [f32; 21],
21538    #[doc = "Coordinate frame of reference for the pose data."]
21539    pub frame_id: MavFrame,
21540    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21541    pub child_frame_id: MavFrame,
21542    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21544    pub reset_counter: u8,
21545    #[doc = "Type of estimator that is providing the odometry."]
21546    #[cfg_attr(feature = "serde", serde(default))]
21547    pub estimator_type: MavEstimatorType,
21548    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21549    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21550    pub quality: i8,
21551}
21552impl ODOMETRY_DATA {
21553    pub const ENCODED_LEN: usize = 233usize;
21554    pub const DEFAULT: Self = Self {
21555        time_usec: 0_u64,
21556        x: 0.0_f32,
21557        y: 0.0_f32,
21558        z: 0.0_f32,
21559        q: [0.0_f32; 4usize],
21560        vx: 0.0_f32,
21561        vy: 0.0_f32,
21562        vz: 0.0_f32,
21563        rollspeed: 0.0_f32,
21564        pitchspeed: 0.0_f32,
21565        yawspeed: 0.0_f32,
21566        pose_covariance: [0.0_f32; 21usize],
21567        velocity_covariance: [0.0_f32; 21usize],
21568        frame_id: MavFrame::DEFAULT,
21569        child_frame_id: MavFrame::DEFAULT,
21570        reset_counter: 0_u8,
21571        estimator_type: MavEstimatorType::DEFAULT,
21572        quality: 0_i8,
21573    };
21574    #[cfg(feature = "arbitrary")]
21575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21576        use arbitrary::{Arbitrary, Unstructured};
21577        let mut buf = [0u8; 1024];
21578        rng.fill_bytes(&mut buf);
21579        let mut unstructured = Unstructured::new(&buf);
21580        Self::arbitrary(&mut unstructured).unwrap_or_default()
21581    }
21582}
21583impl Default for ODOMETRY_DATA {
21584    fn default() -> Self {
21585        Self::DEFAULT.clone()
21586    }
21587}
21588impl MessageData for ODOMETRY_DATA {
21589    type Message = MavMessage;
21590    const ID: u32 = 331u32;
21591    const NAME: &'static str = "ODOMETRY";
21592    const EXTRA_CRC: u8 = 91u8;
21593    const ENCODED_LEN: usize = 233usize;
21594    fn deser(
21595        _version: MavlinkVersion,
21596        __input: &[u8],
21597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21598        let avail_len = __input.len();
21599        let mut payload_buf = [0; Self::ENCODED_LEN];
21600        let mut buf = if avail_len < Self::ENCODED_LEN {
21601            payload_buf[0..avail_len].copy_from_slice(__input);
21602            Bytes::new(&payload_buf)
21603        } else {
21604            Bytes::new(__input)
21605        };
21606        let mut __struct = Self::default();
21607        __struct.time_usec = buf.get_u64_le();
21608        __struct.x = buf.get_f32_le();
21609        __struct.y = buf.get_f32_le();
21610        __struct.z = buf.get_f32_le();
21611        for v in &mut __struct.q {
21612            let val = buf.get_f32_le();
21613            *v = val;
21614        }
21615        __struct.vx = buf.get_f32_le();
21616        __struct.vy = buf.get_f32_le();
21617        __struct.vz = buf.get_f32_le();
21618        __struct.rollspeed = buf.get_f32_le();
21619        __struct.pitchspeed = buf.get_f32_le();
21620        __struct.yawspeed = buf.get_f32_le();
21621        for v in &mut __struct.pose_covariance {
21622            let val = buf.get_f32_le();
21623            *v = val;
21624        }
21625        for v in &mut __struct.velocity_covariance {
21626            let val = buf.get_f32_le();
21627            *v = val;
21628        }
21629        let tmp = buf.get_u8();
21630        __struct.frame_id =
21631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21632                enum_type: "MavFrame",
21633                value: tmp as u32,
21634            })?;
21635        let tmp = buf.get_u8();
21636        __struct.child_frame_id =
21637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21638                enum_type: "MavFrame",
21639                value: tmp as u32,
21640            })?;
21641        __struct.reset_counter = buf.get_u8();
21642        let tmp = buf.get_u8();
21643        __struct.estimator_type =
21644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21645                enum_type: "MavEstimatorType",
21646                value: tmp as u32,
21647            })?;
21648        __struct.quality = buf.get_i8();
21649        Ok(__struct)
21650    }
21651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21652        let mut __tmp = BytesMut::new(bytes);
21653        #[allow(clippy::absurd_extreme_comparisons)]
21654        #[allow(unused_comparisons)]
21655        if __tmp.remaining() < Self::ENCODED_LEN {
21656            panic!(
21657                "buffer is too small (need {} bytes, but got {})",
21658                Self::ENCODED_LEN,
21659                __tmp.remaining(),
21660            )
21661        }
21662        __tmp.put_u64_le(self.time_usec);
21663        __tmp.put_f32_le(self.x);
21664        __tmp.put_f32_le(self.y);
21665        __tmp.put_f32_le(self.z);
21666        for val in &self.q {
21667            __tmp.put_f32_le(*val);
21668        }
21669        __tmp.put_f32_le(self.vx);
21670        __tmp.put_f32_le(self.vy);
21671        __tmp.put_f32_le(self.vz);
21672        __tmp.put_f32_le(self.rollspeed);
21673        __tmp.put_f32_le(self.pitchspeed);
21674        __tmp.put_f32_le(self.yawspeed);
21675        for val in &self.pose_covariance {
21676            __tmp.put_f32_le(*val);
21677        }
21678        for val in &self.velocity_covariance {
21679            __tmp.put_f32_le(*val);
21680        }
21681        __tmp.put_u8(self.frame_id as u8);
21682        __tmp.put_u8(self.child_frame_id as u8);
21683        if matches!(version, MavlinkVersion::V2) {
21684            __tmp.put_u8(self.reset_counter);
21685            __tmp.put_u8(self.estimator_type as u8);
21686            __tmp.put_i8(self.quality);
21687            let len = __tmp.len();
21688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21689        } else {
21690            __tmp.len()
21691        }
21692    }
21693}
21694#[doc = "Hardware status sent by an onboard computer."]
21695#[doc = ""]
21696#[doc = "ID: 390"]
21697#[derive(Debug, Clone, PartialEq)]
21698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21700#[cfg_attr(feature = "ts", derive(TS))]
21701#[cfg_attr(feature = "ts", ts(export))]
21702pub struct ONBOARD_COMPUTER_STATUS_DATA {
21703    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21704    pub time_usec: u64,
21705    #[doc = "Time since system boot."]
21706    pub uptime: u32,
21707    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21708    pub ram_usage: u32,
21709    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21710    pub ram_total: u32,
21711    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21712    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21713    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21714    pub storage_type: [u32; 4],
21715    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21717    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21718    pub storage_usage: [u32; 4],
21719    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21722    pub storage_total: [u32; 4],
21723    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21725    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21726    pub link_type: [u32; 6],
21727    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21730    pub link_tx_rate: [u32; 6],
21731    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21734    pub link_rx_rate: [u32; 6],
21735    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21737    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21738    pub link_tx_max: [u32; 6],
21739    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21741    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21742    pub link_rx_max: [u32; 6],
21743    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21746    pub fan_speed: [i16; 4],
21747    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21748    pub mavtype: u8,
21749    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21750    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21751    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21752    pub cpu_cores: [u8; 8],
21753    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21755    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21756    pub cpu_combined: [u8; 10],
21757    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21760    pub gpu_cores: [u8; 4],
21761    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21764    pub gpu_combined: [u8; 10],
21765    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21766    pub temperature_board: i8,
21767    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21770    pub temperature_core: [i8; 8],
21771}
21772impl ONBOARD_COMPUTER_STATUS_DATA {
21773    pub const ENCODED_LEN: usize = 238usize;
21774    pub const DEFAULT: Self = Self {
21775        time_usec: 0_u64,
21776        uptime: 0_u32,
21777        ram_usage: 0_u32,
21778        ram_total: 0_u32,
21779        storage_type: [0_u32; 4usize],
21780        storage_usage: [0_u32; 4usize],
21781        storage_total: [0_u32; 4usize],
21782        link_type: [0_u32; 6usize],
21783        link_tx_rate: [0_u32; 6usize],
21784        link_rx_rate: [0_u32; 6usize],
21785        link_tx_max: [0_u32; 6usize],
21786        link_rx_max: [0_u32; 6usize],
21787        fan_speed: [0_i16; 4usize],
21788        mavtype: 0_u8,
21789        cpu_cores: [0_u8; 8usize],
21790        cpu_combined: [0_u8; 10usize],
21791        gpu_cores: [0_u8; 4usize],
21792        gpu_combined: [0_u8; 10usize],
21793        temperature_board: 0_i8,
21794        temperature_core: [0_i8; 8usize],
21795    };
21796    #[cfg(feature = "arbitrary")]
21797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21798        use arbitrary::{Arbitrary, Unstructured};
21799        let mut buf = [0u8; 1024];
21800        rng.fill_bytes(&mut buf);
21801        let mut unstructured = Unstructured::new(&buf);
21802        Self::arbitrary(&mut unstructured).unwrap_or_default()
21803    }
21804}
21805impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21806    fn default() -> Self {
21807        Self::DEFAULT.clone()
21808    }
21809}
21810impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21811    type Message = MavMessage;
21812    const ID: u32 = 390u32;
21813    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21814    const EXTRA_CRC: u8 = 156u8;
21815    const ENCODED_LEN: usize = 238usize;
21816    fn deser(
21817        _version: MavlinkVersion,
21818        __input: &[u8],
21819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21820        let avail_len = __input.len();
21821        let mut payload_buf = [0; Self::ENCODED_LEN];
21822        let mut buf = if avail_len < Self::ENCODED_LEN {
21823            payload_buf[0..avail_len].copy_from_slice(__input);
21824            Bytes::new(&payload_buf)
21825        } else {
21826            Bytes::new(__input)
21827        };
21828        let mut __struct = Self::default();
21829        __struct.time_usec = buf.get_u64_le();
21830        __struct.uptime = buf.get_u32_le();
21831        __struct.ram_usage = buf.get_u32_le();
21832        __struct.ram_total = buf.get_u32_le();
21833        for v in &mut __struct.storage_type {
21834            let val = buf.get_u32_le();
21835            *v = val;
21836        }
21837        for v in &mut __struct.storage_usage {
21838            let val = buf.get_u32_le();
21839            *v = val;
21840        }
21841        for v in &mut __struct.storage_total {
21842            let val = buf.get_u32_le();
21843            *v = val;
21844        }
21845        for v in &mut __struct.link_type {
21846            let val = buf.get_u32_le();
21847            *v = val;
21848        }
21849        for v in &mut __struct.link_tx_rate {
21850            let val = buf.get_u32_le();
21851            *v = val;
21852        }
21853        for v in &mut __struct.link_rx_rate {
21854            let val = buf.get_u32_le();
21855            *v = val;
21856        }
21857        for v in &mut __struct.link_tx_max {
21858            let val = buf.get_u32_le();
21859            *v = val;
21860        }
21861        for v in &mut __struct.link_rx_max {
21862            let val = buf.get_u32_le();
21863            *v = val;
21864        }
21865        for v in &mut __struct.fan_speed {
21866            let val = buf.get_i16_le();
21867            *v = val;
21868        }
21869        __struct.mavtype = buf.get_u8();
21870        for v in &mut __struct.cpu_cores {
21871            let val = buf.get_u8();
21872            *v = val;
21873        }
21874        for v in &mut __struct.cpu_combined {
21875            let val = buf.get_u8();
21876            *v = val;
21877        }
21878        for v in &mut __struct.gpu_cores {
21879            let val = buf.get_u8();
21880            *v = val;
21881        }
21882        for v in &mut __struct.gpu_combined {
21883            let val = buf.get_u8();
21884            *v = val;
21885        }
21886        __struct.temperature_board = buf.get_i8();
21887        for v in &mut __struct.temperature_core {
21888            let val = buf.get_i8();
21889            *v = val;
21890        }
21891        Ok(__struct)
21892    }
21893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21894        let mut __tmp = BytesMut::new(bytes);
21895        #[allow(clippy::absurd_extreme_comparisons)]
21896        #[allow(unused_comparisons)]
21897        if __tmp.remaining() < Self::ENCODED_LEN {
21898            panic!(
21899                "buffer is too small (need {} bytes, but got {})",
21900                Self::ENCODED_LEN,
21901                __tmp.remaining(),
21902            )
21903        }
21904        __tmp.put_u64_le(self.time_usec);
21905        __tmp.put_u32_le(self.uptime);
21906        __tmp.put_u32_le(self.ram_usage);
21907        __tmp.put_u32_le(self.ram_total);
21908        for val in &self.storage_type {
21909            __tmp.put_u32_le(*val);
21910        }
21911        for val in &self.storage_usage {
21912            __tmp.put_u32_le(*val);
21913        }
21914        for val in &self.storage_total {
21915            __tmp.put_u32_le(*val);
21916        }
21917        for val in &self.link_type {
21918            __tmp.put_u32_le(*val);
21919        }
21920        for val in &self.link_tx_rate {
21921            __tmp.put_u32_le(*val);
21922        }
21923        for val in &self.link_rx_rate {
21924            __tmp.put_u32_le(*val);
21925        }
21926        for val in &self.link_tx_max {
21927            __tmp.put_u32_le(*val);
21928        }
21929        for val in &self.link_rx_max {
21930            __tmp.put_u32_le(*val);
21931        }
21932        for val in &self.fan_speed {
21933            __tmp.put_i16_le(*val);
21934        }
21935        __tmp.put_u8(self.mavtype);
21936        for val in &self.cpu_cores {
21937            __tmp.put_u8(*val);
21938        }
21939        for val in &self.cpu_combined {
21940            __tmp.put_u8(*val);
21941        }
21942        for val in &self.gpu_cores {
21943            __tmp.put_u8(*val);
21944        }
21945        for val in &self.gpu_combined {
21946            __tmp.put_u8(*val);
21947        }
21948        __tmp.put_i8(self.temperature_board);
21949        for val in &self.temperature_core {
21950            __tmp.put_i8(*val);
21951        }
21952        if matches!(version, MavlinkVersion::V2) {
21953            let len = __tmp.len();
21954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21955        } else {
21956            __tmp.len()
21957        }
21958    }
21959}
21960#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21961#[doc = ""]
21962#[doc = "ID: 12918"]
21963#[derive(Debug, Clone, PartialEq)]
21964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21966#[cfg_attr(feature = "ts", derive(TS))]
21967#[cfg_attr(feature = "ts", ts(export))]
21968pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21969    #[doc = "Status level indicating if arming is allowed."]
21970    pub status: MavOdidArmStatus,
21971    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21972    #[cfg_attr(feature = "ts", ts(type = "string"))]
21973    pub error: CharArray<50>,
21974}
21975impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21976    pub const ENCODED_LEN: usize = 51usize;
21977    pub const DEFAULT: Self = Self {
21978        status: MavOdidArmStatus::DEFAULT,
21979        error: CharArray::new([0_u8; 50usize]),
21980    };
21981    #[cfg(feature = "arbitrary")]
21982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21983        use arbitrary::{Arbitrary, Unstructured};
21984        let mut buf = [0u8; 1024];
21985        rng.fill_bytes(&mut buf);
21986        let mut unstructured = Unstructured::new(&buf);
21987        Self::arbitrary(&mut unstructured).unwrap_or_default()
21988    }
21989}
21990impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21991    fn default() -> Self {
21992        Self::DEFAULT.clone()
21993    }
21994}
21995impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21996    type Message = MavMessage;
21997    const ID: u32 = 12918u32;
21998    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21999    const EXTRA_CRC: u8 = 139u8;
22000    const ENCODED_LEN: usize = 51usize;
22001    fn deser(
22002        _version: MavlinkVersion,
22003        __input: &[u8],
22004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22005        let avail_len = __input.len();
22006        let mut payload_buf = [0; Self::ENCODED_LEN];
22007        let mut buf = if avail_len < Self::ENCODED_LEN {
22008            payload_buf[0..avail_len].copy_from_slice(__input);
22009            Bytes::new(&payload_buf)
22010        } else {
22011            Bytes::new(__input)
22012        };
22013        let mut __struct = Self::default();
22014        let tmp = buf.get_u8();
22015        __struct.status =
22016            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22017                enum_type: "MavOdidArmStatus",
22018                value: tmp as u32,
22019            })?;
22020        let mut tmp = [0_u8; 50usize];
22021        for v in &mut tmp {
22022            *v = buf.get_u8();
22023        }
22024        __struct.error = CharArray::new(tmp);
22025        Ok(__struct)
22026    }
22027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22028        let mut __tmp = BytesMut::new(bytes);
22029        #[allow(clippy::absurd_extreme_comparisons)]
22030        #[allow(unused_comparisons)]
22031        if __tmp.remaining() < Self::ENCODED_LEN {
22032            panic!(
22033                "buffer is too small (need {} bytes, but got {})",
22034                Self::ENCODED_LEN,
22035                __tmp.remaining(),
22036            )
22037        }
22038        __tmp.put_u8(self.status as u8);
22039        for val in &self.error {
22040            __tmp.put_u8(*val);
22041        }
22042        if matches!(version, MavlinkVersion::V2) {
22043            let len = __tmp.len();
22044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22045        } else {
22046            __tmp.len()
22047        }
22048    }
22049}
22050#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22051#[doc = ""]
22052#[doc = "ID: 12902"]
22053#[derive(Debug, Clone, PartialEq)]
22054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22056#[cfg_attr(feature = "ts", derive(TS))]
22057#[cfg_attr(feature = "ts", ts(export))]
22058pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22059    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22060    pub timestamp: u32,
22061    #[doc = "System ID (0 for broadcast)."]
22062    pub target_system: u8,
22063    #[doc = "Component ID (0 for broadcast)."]
22064    pub target_component: u8,
22065    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22066    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22067    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22068    pub id_or_mac: [u8; 20],
22069    #[doc = "Indicates the type of authentication."]
22070    pub authentication_type: MavOdidAuthType,
22071    #[doc = "Allowed range is 0 - 15."]
22072    pub data_page: u8,
22073    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22074    pub last_page_index: u8,
22075    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22076    pub length: u8,
22077    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22079    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22080    pub authentication_data: [u8; 23],
22081}
22082impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22083    pub const ENCODED_LEN: usize = 53usize;
22084    pub const DEFAULT: Self = Self {
22085        timestamp: 0_u32,
22086        target_system: 0_u8,
22087        target_component: 0_u8,
22088        id_or_mac: [0_u8; 20usize],
22089        authentication_type: MavOdidAuthType::DEFAULT,
22090        data_page: 0_u8,
22091        last_page_index: 0_u8,
22092        length: 0_u8,
22093        authentication_data: [0_u8; 23usize],
22094    };
22095    #[cfg(feature = "arbitrary")]
22096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22097        use arbitrary::{Arbitrary, Unstructured};
22098        let mut buf = [0u8; 1024];
22099        rng.fill_bytes(&mut buf);
22100        let mut unstructured = Unstructured::new(&buf);
22101        Self::arbitrary(&mut unstructured).unwrap_or_default()
22102    }
22103}
22104impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22105    fn default() -> Self {
22106        Self::DEFAULT.clone()
22107    }
22108}
22109impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22110    type Message = MavMessage;
22111    const ID: u32 = 12902u32;
22112    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22113    const EXTRA_CRC: u8 = 140u8;
22114    const ENCODED_LEN: usize = 53usize;
22115    fn deser(
22116        _version: MavlinkVersion,
22117        __input: &[u8],
22118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22119        let avail_len = __input.len();
22120        let mut payload_buf = [0; Self::ENCODED_LEN];
22121        let mut buf = if avail_len < Self::ENCODED_LEN {
22122            payload_buf[0..avail_len].copy_from_slice(__input);
22123            Bytes::new(&payload_buf)
22124        } else {
22125            Bytes::new(__input)
22126        };
22127        let mut __struct = Self::default();
22128        __struct.timestamp = buf.get_u32_le();
22129        __struct.target_system = buf.get_u8();
22130        __struct.target_component = buf.get_u8();
22131        for v in &mut __struct.id_or_mac {
22132            let val = buf.get_u8();
22133            *v = val;
22134        }
22135        let tmp = buf.get_u8();
22136        __struct.authentication_type =
22137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22138                enum_type: "MavOdidAuthType",
22139                value: tmp as u32,
22140            })?;
22141        __struct.data_page = buf.get_u8();
22142        __struct.last_page_index = buf.get_u8();
22143        __struct.length = buf.get_u8();
22144        for v in &mut __struct.authentication_data {
22145            let val = buf.get_u8();
22146            *v = val;
22147        }
22148        Ok(__struct)
22149    }
22150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22151        let mut __tmp = BytesMut::new(bytes);
22152        #[allow(clippy::absurd_extreme_comparisons)]
22153        #[allow(unused_comparisons)]
22154        if __tmp.remaining() < Self::ENCODED_LEN {
22155            panic!(
22156                "buffer is too small (need {} bytes, but got {})",
22157                Self::ENCODED_LEN,
22158                __tmp.remaining(),
22159            )
22160        }
22161        __tmp.put_u32_le(self.timestamp);
22162        __tmp.put_u8(self.target_system);
22163        __tmp.put_u8(self.target_component);
22164        for val in &self.id_or_mac {
22165            __tmp.put_u8(*val);
22166        }
22167        __tmp.put_u8(self.authentication_type as u8);
22168        __tmp.put_u8(self.data_page);
22169        __tmp.put_u8(self.last_page_index);
22170        __tmp.put_u8(self.length);
22171        for val in &self.authentication_data {
22172            __tmp.put_u8(*val);
22173        }
22174        if matches!(version, MavlinkVersion::V2) {
22175            let len = __tmp.len();
22176            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22177        } else {
22178            __tmp.len()
22179        }
22180    }
22181}
22182#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22183#[doc = ""]
22184#[doc = "ID: 12900"]
22185#[derive(Debug, Clone, PartialEq)]
22186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22188#[cfg_attr(feature = "ts", derive(TS))]
22189#[cfg_attr(feature = "ts", ts(export))]
22190pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22191    #[doc = "System ID (0 for broadcast)."]
22192    pub target_system: u8,
22193    #[doc = "Component ID (0 for broadcast)."]
22194    pub target_component: u8,
22195    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22196    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22197    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22198    pub id_or_mac: [u8; 20],
22199    #[doc = "Indicates the format for the uas_id field of this message."]
22200    pub id_type: MavOdidIdType,
22201    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22202    pub ua_type: MavOdidUaType,
22203    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22204    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22205    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22206    pub uas_id: [u8; 20],
22207}
22208impl OPEN_DRONE_ID_BASIC_ID_DATA {
22209    pub const ENCODED_LEN: usize = 44usize;
22210    pub const DEFAULT: Self = Self {
22211        target_system: 0_u8,
22212        target_component: 0_u8,
22213        id_or_mac: [0_u8; 20usize],
22214        id_type: MavOdidIdType::DEFAULT,
22215        ua_type: MavOdidUaType::DEFAULT,
22216        uas_id: [0_u8; 20usize],
22217    };
22218    #[cfg(feature = "arbitrary")]
22219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22220        use arbitrary::{Arbitrary, Unstructured};
22221        let mut buf = [0u8; 1024];
22222        rng.fill_bytes(&mut buf);
22223        let mut unstructured = Unstructured::new(&buf);
22224        Self::arbitrary(&mut unstructured).unwrap_or_default()
22225    }
22226}
22227impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22228    fn default() -> Self {
22229        Self::DEFAULT.clone()
22230    }
22231}
22232impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22233    type Message = MavMessage;
22234    const ID: u32 = 12900u32;
22235    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22236    const EXTRA_CRC: u8 = 114u8;
22237    const ENCODED_LEN: usize = 44usize;
22238    fn deser(
22239        _version: MavlinkVersion,
22240        __input: &[u8],
22241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22242        let avail_len = __input.len();
22243        let mut payload_buf = [0; Self::ENCODED_LEN];
22244        let mut buf = if avail_len < Self::ENCODED_LEN {
22245            payload_buf[0..avail_len].copy_from_slice(__input);
22246            Bytes::new(&payload_buf)
22247        } else {
22248            Bytes::new(__input)
22249        };
22250        let mut __struct = Self::default();
22251        __struct.target_system = buf.get_u8();
22252        __struct.target_component = buf.get_u8();
22253        for v in &mut __struct.id_or_mac {
22254            let val = buf.get_u8();
22255            *v = val;
22256        }
22257        let tmp = buf.get_u8();
22258        __struct.id_type =
22259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22260                enum_type: "MavOdidIdType",
22261                value: tmp as u32,
22262            })?;
22263        let tmp = buf.get_u8();
22264        __struct.ua_type =
22265            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22266                enum_type: "MavOdidUaType",
22267                value: tmp as u32,
22268            })?;
22269        for v in &mut __struct.uas_id {
22270            let val = buf.get_u8();
22271            *v = val;
22272        }
22273        Ok(__struct)
22274    }
22275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22276        let mut __tmp = BytesMut::new(bytes);
22277        #[allow(clippy::absurd_extreme_comparisons)]
22278        #[allow(unused_comparisons)]
22279        if __tmp.remaining() < Self::ENCODED_LEN {
22280            panic!(
22281                "buffer is too small (need {} bytes, but got {})",
22282                Self::ENCODED_LEN,
22283                __tmp.remaining(),
22284            )
22285        }
22286        __tmp.put_u8(self.target_system);
22287        __tmp.put_u8(self.target_component);
22288        for val in &self.id_or_mac {
22289            __tmp.put_u8(*val);
22290        }
22291        __tmp.put_u8(self.id_type as u8);
22292        __tmp.put_u8(self.ua_type as u8);
22293        for val in &self.uas_id {
22294            __tmp.put_u8(*val);
22295        }
22296        if matches!(version, MavlinkVersion::V2) {
22297            let len = __tmp.len();
22298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22299        } else {
22300            __tmp.len()
22301        }
22302    }
22303}
22304#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22305#[doc = ""]
22306#[doc = "ID: 12901"]
22307#[derive(Debug, Clone, PartialEq)]
22308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22310#[cfg_attr(feature = "ts", derive(TS))]
22311#[cfg_attr(feature = "ts", ts(export))]
22312pub struct OPEN_DRONE_ID_LOCATION_DATA {
22313    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22314    pub latitude: i32,
22315    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22316    pub longitude: i32,
22317    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22318    pub altitude_barometric: f32,
22319    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22320    pub altitude_geodetic: f32,
22321    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22322    pub height: f32,
22323    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22324    pub timestamp: f32,
22325    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22326    pub direction: u16,
22327    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22328    pub speed_horizontal: u16,
22329    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22330    pub speed_vertical: i16,
22331    #[doc = "System ID (0 for broadcast)."]
22332    pub target_system: u8,
22333    #[doc = "Component ID (0 for broadcast)."]
22334    pub target_component: u8,
22335    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22337    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22338    pub id_or_mac: [u8; 20],
22339    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22340    pub status: MavOdidStatus,
22341    #[doc = "Indicates the reference point for the height field."]
22342    pub height_reference: MavOdidHeightRef,
22343    #[doc = "The accuracy of the horizontal position."]
22344    pub horizontal_accuracy: MavOdidHorAcc,
22345    #[doc = "The accuracy of the vertical position."]
22346    pub vertical_accuracy: MavOdidVerAcc,
22347    #[doc = "The accuracy of the barometric altitude."]
22348    pub barometer_accuracy: MavOdidVerAcc,
22349    #[doc = "The accuracy of the horizontal and vertical speed."]
22350    pub speed_accuracy: MavOdidSpeedAcc,
22351    #[doc = "The accuracy of the timestamps."]
22352    pub timestamp_accuracy: MavOdidTimeAcc,
22353}
22354impl OPEN_DRONE_ID_LOCATION_DATA {
22355    pub const ENCODED_LEN: usize = 59usize;
22356    pub const DEFAULT: Self = Self {
22357        latitude: 0_i32,
22358        longitude: 0_i32,
22359        altitude_barometric: 0.0_f32,
22360        altitude_geodetic: 0.0_f32,
22361        height: 0.0_f32,
22362        timestamp: 0.0_f32,
22363        direction: 0_u16,
22364        speed_horizontal: 0_u16,
22365        speed_vertical: 0_i16,
22366        target_system: 0_u8,
22367        target_component: 0_u8,
22368        id_or_mac: [0_u8; 20usize],
22369        status: MavOdidStatus::DEFAULT,
22370        height_reference: MavOdidHeightRef::DEFAULT,
22371        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22372        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22373        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22374        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22375        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22376    };
22377    #[cfg(feature = "arbitrary")]
22378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22379        use arbitrary::{Arbitrary, Unstructured};
22380        let mut buf = [0u8; 1024];
22381        rng.fill_bytes(&mut buf);
22382        let mut unstructured = Unstructured::new(&buf);
22383        Self::arbitrary(&mut unstructured).unwrap_or_default()
22384    }
22385}
22386impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22387    fn default() -> Self {
22388        Self::DEFAULT.clone()
22389    }
22390}
22391impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22392    type Message = MavMessage;
22393    const ID: u32 = 12901u32;
22394    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22395    const EXTRA_CRC: u8 = 254u8;
22396    const ENCODED_LEN: usize = 59usize;
22397    fn deser(
22398        _version: MavlinkVersion,
22399        __input: &[u8],
22400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22401        let avail_len = __input.len();
22402        let mut payload_buf = [0; Self::ENCODED_LEN];
22403        let mut buf = if avail_len < Self::ENCODED_LEN {
22404            payload_buf[0..avail_len].copy_from_slice(__input);
22405            Bytes::new(&payload_buf)
22406        } else {
22407            Bytes::new(__input)
22408        };
22409        let mut __struct = Self::default();
22410        __struct.latitude = buf.get_i32_le();
22411        __struct.longitude = buf.get_i32_le();
22412        __struct.altitude_barometric = buf.get_f32_le();
22413        __struct.altitude_geodetic = buf.get_f32_le();
22414        __struct.height = buf.get_f32_le();
22415        __struct.timestamp = buf.get_f32_le();
22416        __struct.direction = buf.get_u16_le();
22417        __struct.speed_horizontal = buf.get_u16_le();
22418        __struct.speed_vertical = buf.get_i16_le();
22419        __struct.target_system = buf.get_u8();
22420        __struct.target_component = buf.get_u8();
22421        for v in &mut __struct.id_or_mac {
22422            let val = buf.get_u8();
22423            *v = val;
22424        }
22425        let tmp = buf.get_u8();
22426        __struct.status =
22427            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22428                enum_type: "MavOdidStatus",
22429                value: tmp as u32,
22430            })?;
22431        let tmp = buf.get_u8();
22432        __struct.height_reference =
22433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22434                enum_type: "MavOdidHeightRef",
22435                value: tmp as u32,
22436            })?;
22437        let tmp = buf.get_u8();
22438        __struct.horizontal_accuracy =
22439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22440                enum_type: "MavOdidHorAcc",
22441                value: tmp as u32,
22442            })?;
22443        let tmp = buf.get_u8();
22444        __struct.vertical_accuracy =
22445            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22446                enum_type: "MavOdidVerAcc",
22447                value: tmp as u32,
22448            })?;
22449        let tmp = buf.get_u8();
22450        __struct.barometer_accuracy =
22451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22452                enum_type: "MavOdidVerAcc",
22453                value: tmp as u32,
22454            })?;
22455        let tmp = buf.get_u8();
22456        __struct.speed_accuracy =
22457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22458                enum_type: "MavOdidSpeedAcc",
22459                value: tmp as u32,
22460            })?;
22461        let tmp = buf.get_u8();
22462        __struct.timestamp_accuracy =
22463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22464                enum_type: "MavOdidTimeAcc",
22465                value: tmp as u32,
22466            })?;
22467        Ok(__struct)
22468    }
22469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22470        let mut __tmp = BytesMut::new(bytes);
22471        #[allow(clippy::absurd_extreme_comparisons)]
22472        #[allow(unused_comparisons)]
22473        if __tmp.remaining() < Self::ENCODED_LEN {
22474            panic!(
22475                "buffer is too small (need {} bytes, but got {})",
22476                Self::ENCODED_LEN,
22477                __tmp.remaining(),
22478            )
22479        }
22480        __tmp.put_i32_le(self.latitude);
22481        __tmp.put_i32_le(self.longitude);
22482        __tmp.put_f32_le(self.altitude_barometric);
22483        __tmp.put_f32_le(self.altitude_geodetic);
22484        __tmp.put_f32_le(self.height);
22485        __tmp.put_f32_le(self.timestamp);
22486        __tmp.put_u16_le(self.direction);
22487        __tmp.put_u16_le(self.speed_horizontal);
22488        __tmp.put_i16_le(self.speed_vertical);
22489        __tmp.put_u8(self.target_system);
22490        __tmp.put_u8(self.target_component);
22491        for val in &self.id_or_mac {
22492            __tmp.put_u8(*val);
22493        }
22494        __tmp.put_u8(self.status as u8);
22495        __tmp.put_u8(self.height_reference as u8);
22496        __tmp.put_u8(self.horizontal_accuracy as u8);
22497        __tmp.put_u8(self.vertical_accuracy as u8);
22498        __tmp.put_u8(self.barometer_accuracy as u8);
22499        __tmp.put_u8(self.speed_accuracy as u8);
22500        __tmp.put_u8(self.timestamp_accuracy as u8);
22501        if matches!(version, MavlinkVersion::V2) {
22502            let len = __tmp.len();
22503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22504        } else {
22505            __tmp.len()
22506        }
22507    }
22508}
22509#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22510#[doc = ""]
22511#[doc = "ID: 12915"]
22512#[derive(Debug, Clone, PartialEq)]
22513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22515#[cfg_attr(feature = "ts", derive(TS))]
22516#[cfg_attr(feature = "ts", ts(export))]
22517pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22518    #[doc = "System ID (0 for broadcast)."]
22519    pub target_system: u8,
22520    #[doc = "Component ID (0 for broadcast)."]
22521    pub target_component: u8,
22522    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22523    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22524    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22525    pub id_or_mac: [u8; 20],
22526    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22527    pub single_message_size: u8,
22528    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22529    pub msg_pack_size: u8,
22530    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22533    pub messages: [u8; 225],
22534}
22535impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22536    pub const ENCODED_LEN: usize = 249usize;
22537    pub const DEFAULT: Self = Self {
22538        target_system: 0_u8,
22539        target_component: 0_u8,
22540        id_or_mac: [0_u8; 20usize],
22541        single_message_size: 0_u8,
22542        msg_pack_size: 0_u8,
22543        messages: [0_u8; 225usize],
22544    };
22545    #[cfg(feature = "arbitrary")]
22546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22547        use arbitrary::{Arbitrary, Unstructured};
22548        let mut buf = [0u8; 1024];
22549        rng.fill_bytes(&mut buf);
22550        let mut unstructured = Unstructured::new(&buf);
22551        Self::arbitrary(&mut unstructured).unwrap_or_default()
22552    }
22553}
22554impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22555    fn default() -> Self {
22556        Self::DEFAULT.clone()
22557    }
22558}
22559impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22560    type Message = MavMessage;
22561    const ID: u32 = 12915u32;
22562    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22563    const EXTRA_CRC: u8 = 94u8;
22564    const ENCODED_LEN: usize = 249usize;
22565    fn deser(
22566        _version: MavlinkVersion,
22567        __input: &[u8],
22568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22569        let avail_len = __input.len();
22570        let mut payload_buf = [0; Self::ENCODED_LEN];
22571        let mut buf = if avail_len < Self::ENCODED_LEN {
22572            payload_buf[0..avail_len].copy_from_slice(__input);
22573            Bytes::new(&payload_buf)
22574        } else {
22575            Bytes::new(__input)
22576        };
22577        let mut __struct = Self::default();
22578        __struct.target_system = buf.get_u8();
22579        __struct.target_component = buf.get_u8();
22580        for v in &mut __struct.id_or_mac {
22581            let val = buf.get_u8();
22582            *v = val;
22583        }
22584        __struct.single_message_size = buf.get_u8();
22585        __struct.msg_pack_size = buf.get_u8();
22586        for v in &mut __struct.messages {
22587            let val = buf.get_u8();
22588            *v = val;
22589        }
22590        Ok(__struct)
22591    }
22592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22593        let mut __tmp = BytesMut::new(bytes);
22594        #[allow(clippy::absurd_extreme_comparisons)]
22595        #[allow(unused_comparisons)]
22596        if __tmp.remaining() < Self::ENCODED_LEN {
22597            panic!(
22598                "buffer is too small (need {} bytes, but got {})",
22599                Self::ENCODED_LEN,
22600                __tmp.remaining(),
22601            )
22602        }
22603        __tmp.put_u8(self.target_system);
22604        __tmp.put_u8(self.target_component);
22605        for val in &self.id_or_mac {
22606            __tmp.put_u8(*val);
22607        }
22608        __tmp.put_u8(self.single_message_size);
22609        __tmp.put_u8(self.msg_pack_size);
22610        for val in &self.messages {
22611            __tmp.put_u8(*val);
22612        }
22613        if matches!(version, MavlinkVersion::V2) {
22614            let len = __tmp.len();
22615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22616        } else {
22617            __tmp.len()
22618        }
22619    }
22620}
22621#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22622#[doc = ""]
22623#[doc = "ID: 12905"]
22624#[derive(Debug, Clone, PartialEq)]
22625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22627#[cfg_attr(feature = "ts", derive(TS))]
22628#[cfg_attr(feature = "ts", ts(export))]
22629pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22630    #[doc = "System ID (0 for broadcast)."]
22631    pub target_system: u8,
22632    #[doc = "Component ID (0 for broadcast)."]
22633    pub target_component: u8,
22634    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22635    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22636    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22637    pub id_or_mac: [u8; 20],
22638    #[doc = "Indicates the type of the operator_id field."]
22639    pub operator_id_type: MavOdidOperatorIdType,
22640    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22641    #[cfg_attr(feature = "ts", ts(type = "string"))]
22642    pub operator_id: CharArray<20>,
22643}
22644impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22645    pub const ENCODED_LEN: usize = 43usize;
22646    pub const DEFAULT: Self = Self {
22647        target_system: 0_u8,
22648        target_component: 0_u8,
22649        id_or_mac: [0_u8; 20usize],
22650        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22651        operator_id: CharArray::new([0_u8; 20usize]),
22652    };
22653    #[cfg(feature = "arbitrary")]
22654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22655        use arbitrary::{Arbitrary, Unstructured};
22656        let mut buf = [0u8; 1024];
22657        rng.fill_bytes(&mut buf);
22658        let mut unstructured = Unstructured::new(&buf);
22659        Self::arbitrary(&mut unstructured).unwrap_or_default()
22660    }
22661}
22662impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22663    fn default() -> Self {
22664        Self::DEFAULT.clone()
22665    }
22666}
22667impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22668    type Message = MavMessage;
22669    const ID: u32 = 12905u32;
22670    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22671    const EXTRA_CRC: u8 = 49u8;
22672    const ENCODED_LEN: usize = 43usize;
22673    fn deser(
22674        _version: MavlinkVersion,
22675        __input: &[u8],
22676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22677        let avail_len = __input.len();
22678        let mut payload_buf = [0; Self::ENCODED_LEN];
22679        let mut buf = if avail_len < Self::ENCODED_LEN {
22680            payload_buf[0..avail_len].copy_from_slice(__input);
22681            Bytes::new(&payload_buf)
22682        } else {
22683            Bytes::new(__input)
22684        };
22685        let mut __struct = Self::default();
22686        __struct.target_system = buf.get_u8();
22687        __struct.target_component = buf.get_u8();
22688        for v in &mut __struct.id_or_mac {
22689            let val = buf.get_u8();
22690            *v = val;
22691        }
22692        let tmp = buf.get_u8();
22693        __struct.operator_id_type =
22694            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22695                enum_type: "MavOdidOperatorIdType",
22696                value: tmp as u32,
22697            })?;
22698        let mut tmp = [0_u8; 20usize];
22699        for v in &mut tmp {
22700            *v = buf.get_u8();
22701        }
22702        __struct.operator_id = CharArray::new(tmp);
22703        Ok(__struct)
22704    }
22705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22706        let mut __tmp = BytesMut::new(bytes);
22707        #[allow(clippy::absurd_extreme_comparisons)]
22708        #[allow(unused_comparisons)]
22709        if __tmp.remaining() < Self::ENCODED_LEN {
22710            panic!(
22711                "buffer is too small (need {} bytes, but got {})",
22712                Self::ENCODED_LEN,
22713                __tmp.remaining(),
22714            )
22715        }
22716        __tmp.put_u8(self.target_system);
22717        __tmp.put_u8(self.target_component);
22718        for val in &self.id_or_mac {
22719            __tmp.put_u8(*val);
22720        }
22721        __tmp.put_u8(self.operator_id_type as u8);
22722        for val in &self.operator_id {
22723            __tmp.put_u8(*val);
22724        }
22725        if matches!(version, MavlinkVersion::V2) {
22726            let len = __tmp.len();
22727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22728        } else {
22729            __tmp.len()
22730        }
22731    }
22732}
22733#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22734#[doc = ""]
22735#[doc = "ID: 12903"]
22736#[derive(Debug, Clone, PartialEq)]
22737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22739#[cfg_attr(feature = "ts", derive(TS))]
22740#[cfg_attr(feature = "ts", ts(export))]
22741pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22742    #[doc = "System ID (0 for broadcast)."]
22743    pub target_system: u8,
22744    #[doc = "Component ID (0 for broadcast)."]
22745    pub target_component: u8,
22746    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22749    pub id_or_mac: [u8; 20],
22750    #[doc = "Indicates the type of the description field."]
22751    pub description_type: MavOdidDescType,
22752    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22753    #[cfg_attr(feature = "ts", ts(type = "string"))]
22754    pub description: CharArray<23>,
22755}
22756impl OPEN_DRONE_ID_SELF_ID_DATA {
22757    pub const ENCODED_LEN: usize = 46usize;
22758    pub const DEFAULT: Self = Self {
22759        target_system: 0_u8,
22760        target_component: 0_u8,
22761        id_or_mac: [0_u8; 20usize],
22762        description_type: MavOdidDescType::DEFAULT,
22763        description: CharArray::new([0_u8; 23usize]),
22764    };
22765    #[cfg(feature = "arbitrary")]
22766    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22767        use arbitrary::{Arbitrary, Unstructured};
22768        let mut buf = [0u8; 1024];
22769        rng.fill_bytes(&mut buf);
22770        let mut unstructured = Unstructured::new(&buf);
22771        Self::arbitrary(&mut unstructured).unwrap_or_default()
22772    }
22773}
22774impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22775    fn default() -> Self {
22776        Self::DEFAULT.clone()
22777    }
22778}
22779impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22780    type Message = MavMessage;
22781    const ID: u32 = 12903u32;
22782    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22783    const EXTRA_CRC: u8 = 249u8;
22784    const ENCODED_LEN: usize = 46usize;
22785    fn deser(
22786        _version: MavlinkVersion,
22787        __input: &[u8],
22788    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22789        let avail_len = __input.len();
22790        let mut payload_buf = [0; Self::ENCODED_LEN];
22791        let mut buf = if avail_len < Self::ENCODED_LEN {
22792            payload_buf[0..avail_len].copy_from_slice(__input);
22793            Bytes::new(&payload_buf)
22794        } else {
22795            Bytes::new(__input)
22796        };
22797        let mut __struct = Self::default();
22798        __struct.target_system = buf.get_u8();
22799        __struct.target_component = buf.get_u8();
22800        for v in &mut __struct.id_or_mac {
22801            let val = buf.get_u8();
22802            *v = val;
22803        }
22804        let tmp = buf.get_u8();
22805        __struct.description_type =
22806            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22807                enum_type: "MavOdidDescType",
22808                value: tmp as u32,
22809            })?;
22810        let mut tmp = [0_u8; 23usize];
22811        for v in &mut tmp {
22812            *v = buf.get_u8();
22813        }
22814        __struct.description = CharArray::new(tmp);
22815        Ok(__struct)
22816    }
22817    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22818        let mut __tmp = BytesMut::new(bytes);
22819        #[allow(clippy::absurd_extreme_comparisons)]
22820        #[allow(unused_comparisons)]
22821        if __tmp.remaining() < Self::ENCODED_LEN {
22822            panic!(
22823                "buffer is too small (need {} bytes, but got {})",
22824                Self::ENCODED_LEN,
22825                __tmp.remaining(),
22826            )
22827        }
22828        __tmp.put_u8(self.target_system);
22829        __tmp.put_u8(self.target_component);
22830        for val in &self.id_or_mac {
22831            __tmp.put_u8(*val);
22832        }
22833        __tmp.put_u8(self.description_type as u8);
22834        for val in &self.description {
22835            __tmp.put_u8(*val);
22836        }
22837        if matches!(version, MavlinkVersion::V2) {
22838            let len = __tmp.len();
22839            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22840        } else {
22841            __tmp.len()
22842        }
22843    }
22844}
22845#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22846#[doc = ""]
22847#[doc = "ID: 12904"]
22848#[derive(Debug, Clone, PartialEq)]
22849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22851#[cfg_attr(feature = "ts", derive(TS))]
22852#[cfg_attr(feature = "ts", ts(export))]
22853pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22854    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22855    pub operator_latitude: i32,
22856    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22857    pub operator_longitude: i32,
22858    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22859    pub area_ceiling: f32,
22860    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22861    pub area_floor: f32,
22862    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22863    pub operator_altitude_geo: f32,
22864    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22865    pub timestamp: u32,
22866    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22867    pub area_count: u16,
22868    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22869    pub area_radius: u16,
22870    #[doc = "System ID (0 for broadcast)."]
22871    pub target_system: u8,
22872    #[doc = "Component ID (0 for broadcast)."]
22873    pub target_component: u8,
22874    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22875    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22876    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22877    pub id_or_mac: [u8; 20],
22878    #[doc = "Specifies the operator location type."]
22879    pub operator_location_type: MavOdidOperatorLocationType,
22880    #[doc = "Specifies the classification type of the UA."]
22881    pub classification_type: MavOdidClassificationType,
22882    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22883    pub category_eu: MavOdidCategoryEu,
22884    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22885    pub class_eu: MavOdidClassEu,
22886}
22887impl OPEN_DRONE_ID_SYSTEM_DATA {
22888    pub const ENCODED_LEN: usize = 54usize;
22889    pub const DEFAULT: Self = Self {
22890        operator_latitude: 0_i32,
22891        operator_longitude: 0_i32,
22892        area_ceiling: 0.0_f32,
22893        area_floor: 0.0_f32,
22894        operator_altitude_geo: 0.0_f32,
22895        timestamp: 0_u32,
22896        area_count: 0_u16,
22897        area_radius: 0_u16,
22898        target_system: 0_u8,
22899        target_component: 0_u8,
22900        id_or_mac: [0_u8; 20usize],
22901        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22902        classification_type: MavOdidClassificationType::DEFAULT,
22903        category_eu: MavOdidCategoryEu::DEFAULT,
22904        class_eu: MavOdidClassEu::DEFAULT,
22905    };
22906    #[cfg(feature = "arbitrary")]
22907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22908        use arbitrary::{Arbitrary, Unstructured};
22909        let mut buf = [0u8; 1024];
22910        rng.fill_bytes(&mut buf);
22911        let mut unstructured = Unstructured::new(&buf);
22912        Self::arbitrary(&mut unstructured).unwrap_or_default()
22913    }
22914}
22915impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22916    fn default() -> Self {
22917        Self::DEFAULT.clone()
22918    }
22919}
22920impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22921    type Message = MavMessage;
22922    const ID: u32 = 12904u32;
22923    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22924    const EXTRA_CRC: u8 = 77u8;
22925    const ENCODED_LEN: usize = 54usize;
22926    fn deser(
22927        _version: MavlinkVersion,
22928        __input: &[u8],
22929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22930        let avail_len = __input.len();
22931        let mut payload_buf = [0; Self::ENCODED_LEN];
22932        let mut buf = if avail_len < Self::ENCODED_LEN {
22933            payload_buf[0..avail_len].copy_from_slice(__input);
22934            Bytes::new(&payload_buf)
22935        } else {
22936            Bytes::new(__input)
22937        };
22938        let mut __struct = Self::default();
22939        __struct.operator_latitude = buf.get_i32_le();
22940        __struct.operator_longitude = buf.get_i32_le();
22941        __struct.area_ceiling = buf.get_f32_le();
22942        __struct.area_floor = buf.get_f32_le();
22943        __struct.operator_altitude_geo = buf.get_f32_le();
22944        __struct.timestamp = buf.get_u32_le();
22945        __struct.area_count = buf.get_u16_le();
22946        __struct.area_radius = buf.get_u16_le();
22947        __struct.target_system = buf.get_u8();
22948        __struct.target_component = buf.get_u8();
22949        for v in &mut __struct.id_or_mac {
22950            let val = buf.get_u8();
22951            *v = val;
22952        }
22953        let tmp = buf.get_u8();
22954        __struct.operator_location_type =
22955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22956                enum_type: "MavOdidOperatorLocationType",
22957                value: tmp as u32,
22958            })?;
22959        let tmp = buf.get_u8();
22960        __struct.classification_type =
22961            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22962                enum_type: "MavOdidClassificationType",
22963                value: tmp as u32,
22964            })?;
22965        let tmp = buf.get_u8();
22966        __struct.category_eu =
22967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22968                enum_type: "MavOdidCategoryEu",
22969                value: tmp as u32,
22970            })?;
22971        let tmp = buf.get_u8();
22972        __struct.class_eu =
22973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22974                enum_type: "MavOdidClassEu",
22975                value: tmp as u32,
22976            })?;
22977        Ok(__struct)
22978    }
22979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22980        let mut __tmp = BytesMut::new(bytes);
22981        #[allow(clippy::absurd_extreme_comparisons)]
22982        #[allow(unused_comparisons)]
22983        if __tmp.remaining() < Self::ENCODED_LEN {
22984            panic!(
22985                "buffer is too small (need {} bytes, but got {})",
22986                Self::ENCODED_LEN,
22987                __tmp.remaining(),
22988            )
22989        }
22990        __tmp.put_i32_le(self.operator_latitude);
22991        __tmp.put_i32_le(self.operator_longitude);
22992        __tmp.put_f32_le(self.area_ceiling);
22993        __tmp.put_f32_le(self.area_floor);
22994        __tmp.put_f32_le(self.operator_altitude_geo);
22995        __tmp.put_u32_le(self.timestamp);
22996        __tmp.put_u16_le(self.area_count);
22997        __tmp.put_u16_le(self.area_radius);
22998        __tmp.put_u8(self.target_system);
22999        __tmp.put_u8(self.target_component);
23000        for val in &self.id_or_mac {
23001            __tmp.put_u8(*val);
23002        }
23003        __tmp.put_u8(self.operator_location_type as u8);
23004        __tmp.put_u8(self.classification_type as u8);
23005        __tmp.put_u8(self.category_eu as u8);
23006        __tmp.put_u8(self.class_eu as u8);
23007        if matches!(version, MavlinkVersion::V2) {
23008            let len = __tmp.len();
23009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23010        } else {
23011            __tmp.len()
23012        }
23013    }
23014}
23015#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23016#[doc = ""]
23017#[doc = "ID: 12919"]
23018#[derive(Debug, Clone, PartialEq)]
23019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23021#[cfg_attr(feature = "ts", derive(TS))]
23022#[cfg_attr(feature = "ts", ts(export))]
23023pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23024    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23025    pub operator_latitude: i32,
23026    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23027    pub operator_longitude: i32,
23028    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23029    pub operator_altitude_geo: f32,
23030    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23031    pub timestamp: u32,
23032    #[doc = "System ID (0 for broadcast)."]
23033    pub target_system: u8,
23034    #[doc = "Component ID (0 for broadcast)."]
23035    pub target_component: u8,
23036}
23037impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23038    pub const ENCODED_LEN: usize = 18usize;
23039    pub const DEFAULT: Self = Self {
23040        operator_latitude: 0_i32,
23041        operator_longitude: 0_i32,
23042        operator_altitude_geo: 0.0_f32,
23043        timestamp: 0_u32,
23044        target_system: 0_u8,
23045        target_component: 0_u8,
23046    };
23047    #[cfg(feature = "arbitrary")]
23048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23049        use arbitrary::{Arbitrary, Unstructured};
23050        let mut buf = [0u8; 1024];
23051        rng.fill_bytes(&mut buf);
23052        let mut unstructured = Unstructured::new(&buf);
23053        Self::arbitrary(&mut unstructured).unwrap_or_default()
23054    }
23055}
23056impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23057    fn default() -> Self {
23058        Self::DEFAULT.clone()
23059    }
23060}
23061impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23062    type Message = MavMessage;
23063    const ID: u32 = 12919u32;
23064    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23065    const EXTRA_CRC: u8 = 7u8;
23066    const ENCODED_LEN: usize = 18usize;
23067    fn deser(
23068        _version: MavlinkVersion,
23069        __input: &[u8],
23070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23071        let avail_len = __input.len();
23072        let mut payload_buf = [0; Self::ENCODED_LEN];
23073        let mut buf = if avail_len < Self::ENCODED_LEN {
23074            payload_buf[0..avail_len].copy_from_slice(__input);
23075            Bytes::new(&payload_buf)
23076        } else {
23077            Bytes::new(__input)
23078        };
23079        let mut __struct = Self::default();
23080        __struct.operator_latitude = buf.get_i32_le();
23081        __struct.operator_longitude = buf.get_i32_le();
23082        __struct.operator_altitude_geo = buf.get_f32_le();
23083        __struct.timestamp = buf.get_u32_le();
23084        __struct.target_system = buf.get_u8();
23085        __struct.target_component = buf.get_u8();
23086        Ok(__struct)
23087    }
23088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23089        let mut __tmp = BytesMut::new(bytes);
23090        #[allow(clippy::absurd_extreme_comparisons)]
23091        #[allow(unused_comparisons)]
23092        if __tmp.remaining() < Self::ENCODED_LEN {
23093            panic!(
23094                "buffer is too small (need {} bytes, but got {})",
23095                Self::ENCODED_LEN,
23096                __tmp.remaining(),
23097            )
23098        }
23099        __tmp.put_i32_le(self.operator_latitude);
23100        __tmp.put_i32_le(self.operator_longitude);
23101        __tmp.put_f32_le(self.operator_altitude_geo);
23102        __tmp.put_u32_le(self.timestamp);
23103        __tmp.put_u8(self.target_system);
23104        __tmp.put_u8(self.target_component);
23105        if matches!(version, MavlinkVersion::V2) {
23106            let len = __tmp.len();
23107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23108        } else {
23109            __tmp.len()
23110        }
23111    }
23112}
23113#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23114#[doc = ""]
23115#[doc = "ID: 100"]
23116#[derive(Debug, Clone, PartialEq)]
23117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23119#[cfg_attr(feature = "ts", derive(TS))]
23120#[cfg_attr(feature = "ts", ts(export))]
23121pub struct OPTICAL_FLOW_DATA {
23122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23123    pub time_usec: u64,
23124    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23125    pub flow_comp_m_x: f32,
23126    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23127    pub flow_comp_m_y: f32,
23128    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23129    pub ground_distance: f32,
23130    #[doc = "Flow in x-sensor direction"]
23131    pub flow_x: i16,
23132    #[doc = "Flow in y-sensor direction"]
23133    pub flow_y: i16,
23134    #[doc = "Sensor ID"]
23135    pub sensor_id: u8,
23136    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23137    pub quality: u8,
23138    #[doc = "Flow rate about X axis"]
23139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23140    pub flow_rate_x: f32,
23141    #[doc = "Flow rate about Y axis"]
23142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23143    pub flow_rate_y: f32,
23144}
23145impl OPTICAL_FLOW_DATA {
23146    pub const ENCODED_LEN: usize = 34usize;
23147    pub const DEFAULT: Self = Self {
23148        time_usec: 0_u64,
23149        flow_comp_m_x: 0.0_f32,
23150        flow_comp_m_y: 0.0_f32,
23151        ground_distance: 0.0_f32,
23152        flow_x: 0_i16,
23153        flow_y: 0_i16,
23154        sensor_id: 0_u8,
23155        quality: 0_u8,
23156        flow_rate_x: 0.0_f32,
23157        flow_rate_y: 0.0_f32,
23158    };
23159    #[cfg(feature = "arbitrary")]
23160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23161        use arbitrary::{Arbitrary, Unstructured};
23162        let mut buf = [0u8; 1024];
23163        rng.fill_bytes(&mut buf);
23164        let mut unstructured = Unstructured::new(&buf);
23165        Self::arbitrary(&mut unstructured).unwrap_or_default()
23166    }
23167}
23168impl Default for OPTICAL_FLOW_DATA {
23169    fn default() -> Self {
23170        Self::DEFAULT.clone()
23171    }
23172}
23173impl MessageData for OPTICAL_FLOW_DATA {
23174    type Message = MavMessage;
23175    const ID: u32 = 100u32;
23176    const NAME: &'static str = "OPTICAL_FLOW";
23177    const EXTRA_CRC: u8 = 175u8;
23178    const ENCODED_LEN: usize = 34usize;
23179    fn deser(
23180        _version: MavlinkVersion,
23181        __input: &[u8],
23182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23183        let avail_len = __input.len();
23184        let mut payload_buf = [0; Self::ENCODED_LEN];
23185        let mut buf = if avail_len < Self::ENCODED_LEN {
23186            payload_buf[0..avail_len].copy_from_slice(__input);
23187            Bytes::new(&payload_buf)
23188        } else {
23189            Bytes::new(__input)
23190        };
23191        let mut __struct = Self::default();
23192        __struct.time_usec = buf.get_u64_le();
23193        __struct.flow_comp_m_x = buf.get_f32_le();
23194        __struct.flow_comp_m_y = buf.get_f32_le();
23195        __struct.ground_distance = buf.get_f32_le();
23196        __struct.flow_x = buf.get_i16_le();
23197        __struct.flow_y = buf.get_i16_le();
23198        __struct.sensor_id = buf.get_u8();
23199        __struct.quality = buf.get_u8();
23200        __struct.flow_rate_x = buf.get_f32_le();
23201        __struct.flow_rate_y = buf.get_f32_le();
23202        Ok(__struct)
23203    }
23204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23205        let mut __tmp = BytesMut::new(bytes);
23206        #[allow(clippy::absurd_extreme_comparisons)]
23207        #[allow(unused_comparisons)]
23208        if __tmp.remaining() < Self::ENCODED_LEN {
23209            panic!(
23210                "buffer is too small (need {} bytes, but got {})",
23211                Self::ENCODED_LEN,
23212                __tmp.remaining(),
23213            )
23214        }
23215        __tmp.put_u64_le(self.time_usec);
23216        __tmp.put_f32_le(self.flow_comp_m_x);
23217        __tmp.put_f32_le(self.flow_comp_m_y);
23218        __tmp.put_f32_le(self.ground_distance);
23219        __tmp.put_i16_le(self.flow_x);
23220        __tmp.put_i16_le(self.flow_y);
23221        __tmp.put_u8(self.sensor_id);
23222        __tmp.put_u8(self.quality);
23223        if matches!(version, MavlinkVersion::V2) {
23224            __tmp.put_f32_le(self.flow_rate_x);
23225            __tmp.put_f32_le(self.flow_rate_y);
23226            let len = __tmp.len();
23227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23228        } else {
23229            __tmp.len()
23230        }
23231    }
23232}
23233#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23234#[doc = ""]
23235#[doc = "ID: 106"]
23236#[derive(Debug, Clone, PartialEq)]
23237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23239#[cfg_attr(feature = "ts", derive(TS))]
23240#[cfg_attr(feature = "ts", ts(export))]
23241pub struct OPTICAL_FLOW_RAD_DATA {
23242    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23243    pub time_usec: u64,
23244    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23245    pub integration_time_us: u32,
23246    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23247    pub integrated_x: f32,
23248    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23249    pub integrated_y: f32,
23250    #[doc = "RH rotation around X axis"]
23251    pub integrated_xgyro: f32,
23252    #[doc = "RH rotation around Y axis"]
23253    pub integrated_ygyro: f32,
23254    #[doc = "RH rotation around Z axis"]
23255    pub integrated_zgyro: f32,
23256    #[doc = "Time since the distance was sampled."]
23257    pub time_delta_distance_us: u32,
23258    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23259    pub distance: f32,
23260    #[doc = "Temperature"]
23261    pub temperature: i16,
23262    #[doc = "Sensor ID"]
23263    pub sensor_id: u8,
23264    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23265    pub quality: u8,
23266}
23267impl OPTICAL_FLOW_RAD_DATA {
23268    pub const ENCODED_LEN: usize = 44usize;
23269    pub const DEFAULT: Self = Self {
23270        time_usec: 0_u64,
23271        integration_time_us: 0_u32,
23272        integrated_x: 0.0_f32,
23273        integrated_y: 0.0_f32,
23274        integrated_xgyro: 0.0_f32,
23275        integrated_ygyro: 0.0_f32,
23276        integrated_zgyro: 0.0_f32,
23277        time_delta_distance_us: 0_u32,
23278        distance: 0.0_f32,
23279        temperature: 0_i16,
23280        sensor_id: 0_u8,
23281        quality: 0_u8,
23282    };
23283    #[cfg(feature = "arbitrary")]
23284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23285        use arbitrary::{Arbitrary, Unstructured};
23286        let mut buf = [0u8; 1024];
23287        rng.fill_bytes(&mut buf);
23288        let mut unstructured = Unstructured::new(&buf);
23289        Self::arbitrary(&mut unstructured).unwrap_or_default()
23290    }
23291}
23292impl Default for OPTICAL_FLOW_RAD_DATA {
23293    fn default() -> Self {
23294        Self::DEFAULT.clone()
23295    }
23296}
23297impl MessageData for OPTICAL_FLOW_RAD_DATA {
23298    type Message = MavMessage;
23299    const ID: u32 = 106u32;
23300    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23301    const EXTRA_CRC: u8 = 138u8;
23302    const ENCODED_LEN: usize = 44usize;
23303    fn deser(
23304        _version: MavlinkVersion,
23305        __input: &[u8],
23306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23307        let avail_len = __input.len();
23308        let mut payload_buf = [0; Self::ENCODED_LEN];
23309        let mut buf = if avail_len < Self::ENCODED_LEN {
23310            payload_buf[0..avail_len].copy_from_slice(__input);
23311            Bytes::new(&payload_buf)
23312        } else {
23313            Bytes::new(__input)
23314        };
23315        let mut __struct = Self::default();
23316        __struct.time_usec = buf.get_u64_le();
23317        __struct.integration_time_us = buf.get_u32_le();
23318        __struct.integrated_x = buf.get_f32_le();
23319        __struct.integrated_y = buf.get_f32_le();
23320        __struct.integrated_xgyro = buf.get_f32_le();
23321        __struct.integrated_ygyro = buf.get_f32_le();
23322        __struct.integrated_zgyro = buf.get_f32_le();
23323        __struct.time_delta_distance_us = buf.get_u32_le();
23324        __struct.distance = buf.get_f32_le();
23325        __struct.temperature = buf.get_i16_le();
23326        __struct.sensor_id = buf.get_u8();
23327        __struct.quality = buf.get_u8();
23328        Ok(__struct)
23329    }
23330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23331        let mut __tmp = BytesMut::new(bytes);
23332        #[allow(clippy::absurd_extreme_comparisons)]
23333        #[allow(unused_comparisons)]
23334        if __tmp.remaining() < Self::ENCODED_LEN {
23335            panic!(
23336                "buffer is too small (need {} bytes, but got {})",
23337                Self::ENCODED_LEN,
23338                __tmp.remaining(),
23339            )
23340        }
23341        __tmp.put_u64_le(self.time_usec);
23342        __tmp.put_u32_le(self.integration_time_us);
23343        __tmp.put_f32_le(self.integrated_x);
23344        __tmp.put_f32_le(self.integrated_y);
23345        __tmp.put_f32_le(self.integrated_xgyro);
23346        __tmp.put_f32_le(self.integrated_ygyro);
23347        __tmp.put_f32_le(self.integrated_zgyro);
23348        __tmp.put_u32_le(self.time_delta_distance_us);
23349        __tmp.put_f32_le(self.distance);
23350        __tmp.put_i16_le(self.temperature);
23351        __tmp.put_u8(self.sensor_id);
23352        __tmp.put_u8(self.quality);
23353        if matches!(version, MavlinkVersion::V2) {
23354            let len = __tmp.len();
23355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23356        } else {
23357            __tmp.len()
23358        }
23359    }
23360}
23361#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23362#[doc = ""]
23363#[doc = "ID: 360"]
23364#[derive(Debug, Clone, PartialEq)]
23365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23367#[cfg_attr(feature = "ts", derive(TS))]
23368#[cfg_attr(feature = "ts", ts(export))]
23369pub struct ORBIT_EXECUTION_STATUS_DATA {
23370    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23371    pub time_usec: u64,
23372    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23373    pub radius: f32,
23374    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23375    pub x: i32,
23376    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23377    pub y: i32,
23378    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23379    pub z: f32,
23380    #[doc = "The coordinate system of the fields: x, y, z."]
23381    pub frame: MavFrame,
23382}
23383impl ORBIT_EXECUTION_STATUS_DATA {
23384    pub const ENCODED_LEN: usize = 25usize;
23385    pub const DEFAULT: Self = Self {
23386        time_usec: 0_u64,
23387        radius: 0.0_f32,
23388        x: 0_i32,
23389        y: 0_i32,
23390        z: 0.0_f32,
23391        frame: MavFrame::DEFAULT,
23392    };
23393    #[cfg(feature = "arbitrary")]
23394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23395        use arbitrary::{Arbitrary, Unstructured};
23396        let mut buf = [0u8; 1024];
23397        rng.fill_bytes(&mut buf);
23398        let mut unstructured = Unstructured::new(&buf);
23399        Self::arbitrary(&mut unstructured).unwrap_or_default()
23400    }
23401}
23402impl Default for ORBIT_EXECUTION_STATUS_DATA {
23403    fn default() -> Self {
23404        Self::DEFAULT.clone()
23405    }
23406}
23407impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23408    type Message = MavMessage;
23409    const ID: u32 = 360u32;
23410    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23411    const EXTRA_CRC: u8 = 11u8;
23412    const ENCODED_LEN: usize = 25usize;
23413    fn deser(
23414        _version: MavlinkVersion,
23415        __input: &[u8],
23416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23417        let avail_len = __input.len();
23418        let mut payload_buf = [0; Self::ENCODED_LEN];
23419        let mut buf = if avail_len < Self::ENCODED_LEN {
23420            payload_buf[0..avail_len].copy_from_slice(__input);
23421            Bytes::new(&payload_buf)
23422        } else {
23423            Bytes::new(__input)
23424        };
23425        let mut __struct = Self::default();
23426        __struct.time_usec = buf.get_u64_le();
23427        __struct.radius = buf.get_f32_le();
23428        __struct.x = buf.get_i32_le();
23429        __struct.y = buf.get_i32_le();
23430        __struct.z = buf.get_f32_le();
23431        let tmp = buf.get_u8();
23432        __struct.frame =
23433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23434                enum_type: "MavFrame",
23435                value: tmp as u32,
23436            })?;
23437        Ok(__struct)
23438    }
23439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23440        let mut __tmp = BytesMut::new(bytes);
23441        #[allow(clippy::absurd_extreme_comparisons)]
23442        #[allow(unused_comparisons)]
23443        if __tmp.remaining() < Self::ENCODED_LEN {
23444            panic!(
23445                "buffer is too small (need {} bytes, but got {})",
23446                Self::ENCODED_LEN,
23447                __tmp.remaining(),
23448            )
23449        }
23450        __tmp.put_u64_le(self.time_usec);
23451        __tmp.put_f32_le(self.radius);
23452        __tmp.put_i32_le(self.x);
23453        __tmp.put_i32_le(self.y);
23454        __tmp.put_f32_le(self.z);
23455        __tmp.put_u8(self.frame as u8);
23456        if matches!(version, MavlinkVersion::V2) {
23457            let len = __tmp.len();
23458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23459        } else {
23460            __tmp.len()
23461        }
23462    }
23463}
23464#[doc = "Response from a PARAM_EXT_SET message."]
23465#[doc = ""]
23466#[doc = "ID: 324"]
23467#[derive(Debug, Clone, PartialEq)]
23468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23470#[cfg_attr(feature = "ts", derive(TS))]
23471#[cfg_attr(feature = "ts", ts(export))]
23472pub struct PARAM_EXT_ACK_DATA {
23473    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23474    #[cfg_attr(feature = "ts", ts(type = "string"))]
23475    pub param_id: CharArray<16>,
23476    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23477    #[cfg_attr(feature = "ts", ts(type = "string"))]
23478    pub param_value: CharArray<128>,
23479    #[doc = "Parameter type."]
23480    pub param_type: MavParamExtType,
23481    #[doc = "Result code."]
23482    pub param_result: ParamAck,
23483}
23484impl PARAM_EXT_ACK_DATA {
23485    pub const ENCODED_LEN: usize = 146usize;
23486    pub const DEFAULT: Self = Self {
23487        param_id: CharArray::new([0_u8; 16usize]),
23488        param_value: CharArray::new([0_u8; 128usize]),
23489        param_type: MavParamExtType::DEFAULT,
23490        param_result: ParamAck::DEFAULT,
23491    };
23492    #[cfg(feature = "arbitrary")]
23493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23494        use arbitrary::{Arbitrary, Unstructured};
23495        let mut buf = [0u8; 1024];
23496        rng.fill_bytes(&mut buf);
23497        let mut unstructured = Unstructured::new(&buf);
23498        Self::arbitrary(&mut unstructured).unwrap_or_default()
23499    }
23500}
23501impl Default for PARAM_EXT_ACK_DATA {
23502    fn default() -> Self {
23503        Self::DEFAULT.clone()
23504    }
23505}
23506impl MessageData for PARAM_EXT_ACK_DATA {
23507    type Message = MavMessage;
23508    const ID: u32 = 324u32;
23509    const NAME: &'static str = "PARAM_EXT_ACK";
23510    const EXTRA_CRC: u8 = 132u8;
23511    const ENCODED_LEN: usize = 146usize;
23512    fn deser(
23513        _version: MavlinkVersion,
23514        __input: &[u8],
23515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23516        let avail_len = __input.len();
23517        let mut payload_buf = [0; Self::ENCODED_LEN];
23518        let mut buf = if avail_len < Self::ENCODED_LEN {
23519            payload_buf[0..avail_len].copy_from_slice(__input);
23520            Bytes::new(&payload_buf)
23521        } else {
23522            Bytes::new(__input)
23523        };
23524        let mut __struct = Self::default();
23525        let mut tmp = [0_u8; 16usize];
23526        for v in &mut tmp {
23527            *v = buf.get_u8();
23528        }
23529        __struct.param_id = CharArray::new(tmp);
23530        let mut tmp = [0_u8; 128usize];
23531        for v in &mut tmp {
23532            *v = buf.get_u8();
23533        }
23534        __struct.param_value = CharArray::new(tmp);
23535        let tmp = buf.get_u8();
23536        __struct.param_type =
23537            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23538                enum_type: "MavParamExtType",
23539                value: tmp as u32,
23540            })?;
23541        let tmp = buf.get_u8();
23542        __struct.param_result =
23543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23544                enum_type: "ParamAck",
23545                value: tmp as u32,
23546            })?;
23547        Ok(__struct)
23548    }
23549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23550        let mut __tmp = BytesMut::new(bytes);
23551        #[allow(clippy::absurd_extreme_comparisons)]
23552        #[allow(unused_comparisons)]
23553        if __tmp.remaining() < Self::ENCODED_LEN {
23554            panic!(
23555                "buffer is too small (need {} bytes, but got {})",
23556                Self::ENCODED_LEN,
23557                __tmp.remaining(),
23558            )
23559        }
23560        for val in &self.param_id {
23561            __tmp.put_u8(*val);
23562        }
23563        for val in &self.param_value {
23564            __tmp.put_u8(*val);
23565        }
23566        __tmp.put_u8(self.param_type as u8);
23567        __tmp.put_u8(self.param_result as u8);
23568        if matches!(version, MavlinkVersion::V2) {
23569            let len = __tmp.len();
23570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23571        } else {
23572            __tmp.len()
23573        }
23574    }
23575}
23576#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23577#[doc = ""]
23578#[doc = "ID: 321"]
23579#[derive(Debug, Clone, PartialEq)]
23580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23582#[cfg_attr(feature = "ts", derive(TS))]
23583#[cfg_attr(feature = "ts", ts(export))]
23584pub struct PARAM_EXT_REQUEST_LIST_DATA {
23585    #[doc = "System ID"]
23586    pub target_system: u8,
23587    #[doc = "Component ID"]
23588    pub target_component: u8,
23589}
23590impl PARAM_EXT_REQUEST_LIST_DATA {
23591    pub const ENCODED_LEN: usize = 2usize;
23592    pub const DEFAULT: Self = Self {
23593        target_system: 0_u8,
23594        target_component: 0_u8,
23595    };
23596    #[cfg(feature = "arbitrary")]
23597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23598        use arbitrary::{Arbitrary, Unstructured};
23599        let mut buf = [0u8; 1024];
23600        rng.fill_bytes(&mut buf);
23601        let mut unstructured = Unstructured::new(&buf);
23602        Self::arbitrary(&mut unstructured).unwrap_or_default()
23603    }
23604}
23605impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23606    fn default() -> Self {
23607        Self::DEFAULT.clone()
23608    }
23609}
23610impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23611    type Message = MavMessage;
23612    const ID: u32 = 321u32;
23613    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23614    const EXTRA_CRC: u8 = 88u8;
23615    const ENCODED_LEN: usize = 2usize;
23616    fn deser(
23617        _version: MavlinkVersion,
23618        __input: &[u8],
23619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23620        let avail_len = __input.len();
23621        let mut payload_buf = [0; Self::ENCODED_LEN];
23622        let mut buf = if avail_len < Self::ENCODED_LEN {
23623            payload_buf[0..avail_len].copy_from_slice(__input);
23624            Bytes::new(&payload_buf)
23625        } else {
23626            Bytes::new(__input)
23627        };
23628        let mut __struct = Self::default();
23629        __struct.target_system = buf.get_u8();
23630        __struct.target_component = buf.get_u8();
23631        Ok(__struct)
23632    }
23633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23634        let mut __tmp = BytesMut::new(bytes);
23635        #[allow(clippy::absurd_extreme_comparisons)]
23636        #[allow(unused_comparisons)]
23637        if __tmp.remaining() < Self::ENCODED_LEN {
23638            panic!(
23639                "buffer is too small (need {} bytes, but got {})",
23640                Self::ENCODED_LEN,
23641                __tmp.remaining(),
23642            )
23643        }
23644        __tmp.put_u8(self.target_system);
23645        __tmp.put_u8(self.target_component);
23646        if matches!(version, MavlinkVersion::V2) {
23647            let len = __tmp.len();
23648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23649        } else {
23650            __tmp.len()
23651        }
23652    }
23653}
23654#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23655#[doc = ""]
23656#[doc = "ID: 320"]
23657#[derive(Debug, Clone, PartialEq)]
23658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23660#[cfg_attr(feature = "ts", derive(TS))]
23661#[cfg_attr(feature = "ts", ts(export))]
23662pub struct PARAM_EXT_REQUEST_READ_DATA {
23663    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23664    pub param_index: i16,
23665    #[doc = "System ID"]
23666    pub target_system: u8,
23667    #[doc = "Component ID"]
23668    pub target_component: u8,
23669    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23670    #[cfg_attr(feature = "ts", ts(type = "string"))]
23671    pub param_id: CharArray<16>,
23672}
23673impl PARAM_EXT_REQUEST_READ_DATA {
23674    pub const ENCODED_LEN: usize = 20usize;
23675    pub const DEFAULT: Self = Self {
23676        param_index: 0_i16,
23677        target_system: 0_u8,
23678        target_component: 0_u8,
23679        param_id: CharArray::new([0_u8; 16usize]),
23680    };
23681    #[cfg(feature = "arbitrary")]
23682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23683        use arbitrary::{Arbitrary, Unstructured};
23684        let mut buf = [0u8; 1024];
23685        rng.fill_bytes(&mut buf);
23686        let mut unstructured = Unstructured::new(&buf);
23687        Self::arbitrary(&mut unstructured).unwrap_or_default()
23688    }
23689}
23690impl Default for PARAM_EXT_REQUEST_READ_DATA {
23691    fn default() -> Self {
23692        Self::DEFAULT.clone()
23693    }
23694}
23695impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23696    type Message = MavMessage;
23697    const ID: u32 = 320u32;
23698    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23699    const EXTRA_CRC: u8 = 243u8;
23700    const ENCODED_LEN: usize = 20usize;
23701    fn deser(
23702        _version: MavlinkVersion,
23703        __input: &[u8],
23704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23705        let avail_len = __input.len();
23706        let mut payload_buf = [0; Self::ENCODED_LEN];
23707        let mut buf = if avail_len < Self::ENCODED_LEN {
23708            payload_buf[0..avail_len].copy_from_slice(__input);
23709            Bytes::new(&payload_buf)
23710        } else {
23711            Bytes::new(__input)
23712        };
23713        let mut __struct = Self::default();
23714        __struct.param_index = buf.get_i16_le();
23715        __struct.target_system = buf.get_u8();
23716        __struct.target_component = buf.get_u8();
23717        let mut tmp = [0_u8; 16usize];
23718        for v in &mut tmp {
23719            *v = buf.get_u8();
23720        }
23721        __struct.param_id = CharArray::new(tmp);
23722        Ok(__struct)
23723    }
23724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23725        let mut __tmp = BytesMut::new(bytes);
23726        #[allow(clippy::absurd_extreme_comparisons)]
23727        #[allow(unused_comparisons)]
23728        if __tmp.remaining() < Self::ENCODED_LEN {
23729            panic!(
23730                "buffer is too small (need {} bytes, but got {})",
23731                Self::ENCODED_LEN,
23732                __tmp.remaining(),
23733            )
23734        }
23735        __tmp.put_i16_le(self.param_index);
23736        __tmp.put_u8(self.target_system);
23737        __tmp.put_u8(self.target_component);
23738        for val in &self.param_id {
23739            __tmp.put_u8(*val);
23740        }
23741        if matches!(version, MavlinkVersion::V2) {
23742            let len = __tmp.len();
23743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23744        } else {
23745            __tmp.len()
23746        }
23747    }
23748}
23749#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23750#[doc = ""]
23751#[doc = "ID: 323"]
23752#[derive(Debug, Clone, PartialEq)]
23753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23755#[cfg_attr(feature = "ts", derive(TS))]
23756#[cfg_attr(feature = "ts", ts(export))]
23757pub struct PARAM_EXT_SET_DATA {
23758    #[doc = "System ID"]
23759    pub target_system: u8,
23760    #[doc = "Component ID"]
23761    pub target_component: u8,
23762    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23763    #[cfg_attr(feature = "ts", ts(type = "string"))]
23764    pub param_id: CharArray<16>,
23765    #[doc = "Parameter value"]
23766    #[cfg_attr(feature = "ts", ts(type = "string"))]
23767    pub param_value: CharArray<128>,
23768    #[doc = "Parameter type."]
23769    pub param_type: MavParamExtType,
23770}
23771impl PARAM_EXT_SET_DATA {
23772    pub const ENCODED_LEN: usize = 147usize;
23773    pub const DEFAULT: Self = Self {
23774        target_system: 0_u8,
23775        target_component: 0_u8,
23776        param_id: CharArray::new([0_u8; 16usize]),
23777        param_value: CharArray::new([0_u8; 128usize]),
23778        param_type: MavParamExtType::DEFAULT,
23779    };
23780    #[cfg(feature = "arbitrary")]
23781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23782        use arbitrary::{Arbitrary, Unstructured};
23783        let mut buf = [0u8; 1024];
23784        rng.fill_bytes(&mut buf);
23785        let mut unstructured = Unstructured::new(&buf);
23786        Self::arbitrary(&mut unstructured).unwrap_or_default()
23787    }
23788}
23789impl Default for PARAM_EXT_SET_DATA {
23790    fn default() -> Self {
23791        Self::DEFAULT.clone()
23792    }
23793}
23794impl MessageData for PARAM_EXT_SET_DATA {
23795    type Message = MavMessage;
23796    const ID: u32 = 323u32;
23797    const NAME: &'static str = "PARAM_EXT_SET";
23798    const EXTRA_CRC: u8 = 78u8;
23799    const ENCODED_LEN: usize = 147usize;
23800    fn deser(
23801        _version: MavlinkVersion,
23802        __input: &[u8],
23803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23804        let avail_len = __input.len();
23805        let mut payload_buf = [0; Self::ENCODED_LEN];
23806        let mut buf = if avail_len < Self::ENCODED_LEN {
23807            payload_buf[0..avail_len].copy_from_slice(__input);
23808            Bytes::new(&payload_buf)
23809        } else {
23810            Bytes::new(__input)
23811        };
23812        let mut __struct = Self::default();
23813        __struct.target_system = buf.get_u8();
23814        __struct.target_component = buf.get_u8();
23815        let mut tmp = [0_u8; 16usize];
23816        for v in &mut tmp {
23817            *v = buf.get_u8();
23818        }
23819        __struct.param_id = CharArray::new(tmp);
23820        let mut tmp = [0_u8; 128usize];
23821        for v in &mut tmp {
23822            *v = buf.get_u8();
23823        }
23824        __struct.param_value = CharArray::new(tmp);
23825        let tmp = buf.get_u8();
23826        __struct.param_type =
23827            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23828                enum_type: "MavParamExtType",
23829                value: tmp as u32,
23830            })?;
23831        Ok(__struct)
23832    }
23833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23834        let mut __tmp = BytesMut::new(bytes);
23835        #[allow(clippy::absurd_extreme_comparisons)]
23836        #[allow(unused_comparisons)]
23837        if __tmp.remaining() < Self::ENCODED_LEN {
23838            panic!(
23839                "buffer is too small (need {} bytes, but got {})",
23840                Self::ENCODED_LEN,
23841                __tmp.remaining(),
23842            )
23843        }
23844        __tmp.put_u8(self.target_system);
23845        __tmp.put_u8(self.target_component);
23846        for val in &self.param_id {
23847            __tmp.put_u8(*val);
23848        }
23849        for val in &self.param_value {
23850            __tmp.put_u8(*val);
23851        }
23852        __tmp.put_u8(self.param_type as u8);
23853        if matches!(version, MavlinkVersion::V2) {
23854            let len = __tmp.len();
23855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23856        } else {
23857            __tmp.len()
23858        }
23859    }
23860}
23861#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23862#[doc = ""]
23863#[doc = "ID: 322"]
23864#[derive(Debug, Clone, PartialEq)]
23865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23867#[cfg_attr(feature = "ts", derive(TS))]
23868#[cfg_attr(feature = "ts", ts(export))]
23869pub struct PARAM_EXT_VALUE_DATA {
23870    #[doc = "Total number of parameters"]
23871    pub param_count: u16,
23872    #[doc = "Index of this parameter"]
23873    pub param_index: u16,
23874    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23875    #[cfg_attr(feature = "ts", ts(type = "string"))]
23876    pub param_id: CharArray<16>,
23877    #[doc = "Parameter value"]
23878    #[cfg_attr(feature = "ts", ts(type = "string"))]
23879    pub param_value: CharArray<128>,
23880    #[doc = "Parameter type."]
23881    pub param_type: MavParamExtType,
23882}
23883impl PARAM_EXT_VALUE_DATA {
23884    pub const ENCODED_LEN: usize = 149usize;
23885    pub const DEFAULT: Self = Self {
23886        param_count: 0_u16,
23887        param_index: 0_u16,
23888        param_id: CharArray::new([0_u8; 16usize]),
23889        param_value: CharArray::new([0_u8; 128usize]),
23890        param_type: MavParamExtType::DEFAULT,
23891    };
23892    #[cfg(feature = "arbitrary")]
23893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23894        use arbitrary::{Arbitrary, Unstructured};
23895        let mut buf = [0u8; 1024];
23896        rng.fill_bytes(&mut buf);
23897        let mut unstructured = Unstructured::new(&buf);
23898        Self::arbitrary(&mut unstructured).unwrap_or_default()
23899    }
23900}
23901impl Default for PARAM_EXT_VALUE_DATA {
23902    fn default() -> Self {
23903        Self::DEFAULT.clone()
23904    }
23905}
23906impl MessageData for PARAM_EXT_VALUE_DATA {
23907    type Message = MavMessage;
23908    const ID: u32 = 322u32;
23909    const NAME: &'static str = "PARAM_EXT_VALUE";
23910    const EXTRA_CRC: u8 = 243u8;
23911    const ENCODED_LEN: usize = 149usize;
23912    fn deser(
23913        _version: MavlinkVersion,
23914        __input: &[u8],
23915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23916        let avail_len = __input.len();
23917        let mut payload_buf = [0; Self::ENCODED_LEN];
23918        let mut buf = if avail_len < Self::ENCODED_LEN {
23919            payload_buf[0..avail_len].copy_from_slice(__input);
23920            Bytes::new(&payload_buf)
23921        } else {
23922            Bytes::new(__input)
23923        };
23924        let mut __struct = Self::default();
23925        __struct.param_count = buf.get_u16_le();
23926        __struct.param_index = buf.get_u16_le();
23927        let mut tmp = [0_u8; 16usize];
23928        for v in &mut tmp {
23929            *v = buf.get_u8();
23930        }
23931        __struct.param_id = CharArray::new(tmp);
23932        let mut tmp = [0_u8; 128usize];
23933        for v in &mut tmp {
23934            *v = buf.get_u8();
23935        }
23936        __struct.param_value = CharArray::new(tmp);
23937        let tmp = buf.get_u8();
23938        __struct.param_type =
23939            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23940                enum_type: "MavParamExtType",
23941                value: tmp as u32,
23942            })?;
23943        Ok(__struct)
23944    }
23945    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23946        let mut __tmp = BytesMut::new(bytes);
23947        #[allow(clippy::absurd_extreme_comparisons)]
23948        #[allow(unused_comparisons)]
23949        if __tmp.remaining() < Self::ENCODED_LEN {
23950            panic!(
23951                "buffer is too small (need {} bytes, but got {})",
23952                Self::ENCODED_LEN,
23953                __tmp.remaining(),
23954            )
23955        }
23956        __tmp.put_u16_le(self.param_count);
23957        __tmp.put_u16_le(self.param_index);
23958        for val in &self.param_id {
23959            __tmp.put_u8(*val);
23960        }
23961        for val in &self.param_value {
23962            __tmp.put_u8(*val);
23963        }
23964        __tmp.put_u8(self.param_type as u8);
23965        if matches!(version, MavlinkVersion::V2) {
23966            let len = __tmp.len();
23967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23968        } else {
23969            __tmp.len()
23970        }
23971    }
23972}
23973#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23974#[doc = ""]
23975#[doc = "ID: 50"]
23976#[derive(Debug, Clone, PartialEq)]
23977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23979#[cfg_attr(feature = "ts", derive(TS))]
23980#[cfg_attr(feature = "ts", ts(export))]
23981pub struct PARAM_MAP_RC_DATA {
23982    #[doc = "Initial parameter value"]
23983    pub param_value0: f32,
23984    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23985    pub scale: f32,
23986    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23987    pub param_value_min: f32,
23988    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23989    pub param_value_max: f32,
23990    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23991    pub param_index: i16,
23992    #[doc = "System ID"]
23993    pub target_system: u8,
23994    #[doc = "Component ID"]
23995    pub target_component: u8,
23996    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23997    #[cfg_attr(feature = "ts", ts(type = "string"))]
23998    pub param_id: CharArray<16>,
23999    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24000    pub parameter_rc_channel_index: u8,
24001}
24002impl PARAM_MAP_RC_DATA {
24003    pub const ENCODED_LEN: usize = 37usize;
24004    pub const DEFAULT: Self = Self {
24005        param_value0: 0.0_f32,
24006        scale: 0.0_f32,
24007        param_value_min: 0.0_f32,
24008        param_value_max: 0.0_f32,
24009        param_index: 0_i16,
24010        target_system: 0_u8,
24011        target_component: 0_u8,
24012        param_id: CharArray::new([0_u8; 16usize]),
24013        parameter_rc_channel_index: 0_u8,
24014    };
24015    #[cfg(feature = "arbitrary")]
24016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24017        use arbitrary::{Arbitrary, Unstructured};
24018        let mut buf = [0u8; 1024];
24019        rng.fill_bytes(&mut buf);
24020        let mut unstructured = Unstructured::new(&buf);
24021        Self::arbitrary(&mut unstructured).unwrap_or_default()
24022    }
24023}
24024impl Default for PARAM_MAP_RC_DATA {
24025    fn default() -> Self {
24026        Self::DEFAULT.clone()
24027    }
24028}
24029impl MessageData for PARAM_MAP_RC_DATA {
24030    type Message = MavMessage;
24031    const ID: u32 = 50u32;
24032    const NAME: &'static str = "PARAM_MAP_RC";
24033    const EXTRA_CRC: u8 = 78u8;
24034    const ENCODED_LEN: usize = 37usize;
24035    fn deser(
24036        _version: MavlinkVersion,
24037        __input: &[u8],
24038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24039        let avail_len = __input.len();
24040        let mut payload_buf = [0; Self::ENCODED_LEN];
24041        let mut buf = if avail_len < Self::ENCODED_LEN {
24042            payload_buf[0..avail_len].copy_from_slice(__input);
24043            Bytes::new(&payload_buf)
24044        } else {
24045            Bytes::new(__input)
24046        };
24047        let mut __struct = Self::default();
24048        __struct.param_value0 = buf.get_f32_le();
24049        __struct.scale = buf.get_f32_le();
24050        __struct.param_value_min = buf.get_f32_le();
24051        __struct.param_value_max = buf.get_f32_le();
24052        __struct.param_index = buf.get_i16_le();
24053        __struct.target_system = buf.get_u8();
24054        __struct.target_component = buf.get_u8();
24055        let mut tmp = [0_u8; 16usize];
24056        for v in &mut tmp {
24057            *v = buf.get_u8();
24058        }
24059        __struct.param_id = CharArray::new(tmp);
24060        __struct.parameter_rc_channel_index = buf.get_u8();
24061        Ok(__struct)
24062    }
24063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24064        let mut __tmp = BytesMut::new(bytes);
24065        #[allow(clippy::absurd_extreme_comparisons)]
24066        #[allow(unused_comparisons)]
24067        if __tmp.remaining() < Self::ENCODED_LEN {
24068            panic!(
24069                "buffer is too small (need {} bytes, but got {})",
24070                Self::ENCODED_LEN,
24071                __tmp.remaining(),
24072            )
24073        }
24074        __tmp.put_f32_le(self.param_value0);
24075        __tmp.put_f32_le(self.scale);
24076        __tmp.put_f32_le(self.param_value_min);
24077        __tmp.put_f32_le(self.param_value_max);
24078        __tmp.put_i16_le(self.param_index);
24079        __tmp.put_u8(self.target_system);
24080        __tmp.put_u8(self.target_component);
24081        for val in &self.param_id {
24082            __tmp.put_u8(*val);
24083        }
24084        __tmp.put_u8(self.parameter_rc_channel_index);
24085        if matches!(version, MavlinkVersion::V2) {
24086            let len = __tmp.len();
24087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24088        } else {
24089            __tmp.len()
24090        }
24091    }
24092}
24093#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24094#[doc = ""]
24095#[doc = "ID: 21"]
24096#[derive(Debug, Clone, PartialEq)]
24097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24099#[cfg_attr(feature = "ts", derive(TS))]
24100#[cfg_attr(feature = "ts", ts(export))]
24101pub struct PARAM_REQUEST_LIST_DATA {
24102    #[doc = "System ID"]
24103    pub target_system: u8,
24104    #[doc = "Component ID"]
24105    pub target_component: u8,
24106}
24107impl PARAM_REQUEST_LIST_DATA {
24108    pub const ENCODED_LEN: usize = 2usize;
24109    pub const DEFAULT: Self = Self {
24110        target_system: 0_u8,
24111        target_component: 0_u8,
24112    };
24113    #[cfg(feature = "arbitrary")]
24114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24115        use arbitrary::{Arbitrary, Unstructured};
24116        let mut buf = [0u8; 1024];
24117        rng.fill_bytes(&mut buf);
24118        let mut unstructured = Unstructured::new(&buf);
24119        Self::arbitrary(&mut unstructured).unwrap_or_default()
24120    }
24121}
24122impl Default for PARAM_REQUEST_LIST_DATA {
24123    fn default() -> Self {
24124        Self::DEFAULT.clone()
24125    }
24126}
24127impl MessageData for PARAM_REQUEST_LIST_DATA {
24128    type Message = MavMessage;
24129    const ID: u32 = 21u32;
24130    const NAME: &'static str = "PARAM_REQUEST_LIST";
24131    const EXTRA_CRC: u8 = 159u8;
24132    const ENCODED_LEN: usize = 2usize;
24133    fn deser(
24134        _version: MavlinkVersion,
24135        __input: &[u8],
24136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24137        let avail_len = __input.len();
24138        let mut payload_buf = [0; Self::ENCODED_LEN];
24139        let mut buf = if avail_len < Self::ENCODED_LEN {
24140            payload_buf[0..avail_len].copy_from_slice(__input);
24141            Bytes::new(&payload_buf)
24142        } else {
24143            Bytes::new(__input)
24144        };
24145        let mut __struct = Self::default();
24146        __struct.target_system = buf.get_u8();
24147        __struct.target_component = buf.get_u8();
24148        Ok(__struct)
24149    }
24150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24151        let mut __tmp = BytesMut::new(bytes);
24152        #[allow(clippy::absurd_extreme_comparisons)]
24153        #[allow(unused_comparisons)]
24154        if __tmp.remaining() < Self::ENCODED_LEN {
24155            panic!(
24156                "buffer is too small (need {} bytes, but got {})",
24157                Self::ENCODED_LEN,
24158                __tmp.remaining(),
24159            )
24160        }
24161        __tmp.put_u8(self.target_system);
24162        __tmp.put_u8(self.target_component);
24163        if matches!(version, MavlinkVersion::V2) {
24164            let len = __tmp.len();
24165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24166        } else {
24167            __tmp.len()
24168        }
24169    }
24170}
24171#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24172#[doc = ""]
24173#[doc = "ID: 20"]
24174#[derive(Debug, Clone, PartialEq)]
24175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24177#[cfg_attr(feature = "ts", derive(TS))]
24178#[cfg_attr(feature = "ts", ts(export))]
24179pub struct PARAM_REQUEST_READ_DATA {
24180    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24181    pub param_index: i16,
24182    #[doc = "System ID"]
24183    pub target_system: u8,
24184    #[doc = "Component ID"]
24185    pub target_component: u8,
24186    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24187    #[cfg_attr(feature = "ts", ts(type = "string"))]
24188    pub param_id: CharArray<16>,
24189}
24190impl PARAM_REQUEST_READ_DATA {
24191    pub const ENCODED_LEN: usize = 20usize;
24192    pub const DEFAULT: Self = Self {
24193        param_index: 0_i16,
24194        target_system: 0_u8,
24195        target_component: 0_u8,
24196        param_id: CharArray::new([0_u8; 16usize]),
24197    };
24198    #[cfg(feature = "arbitrary")]
24199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24200        use arbitrary::{Arbitrary, Unstructured};
24201        let mut buf = [0u8; 1024];
24202        rng.fill_bytes(&mut buf);
24203        let mut unstructured = Unstructured::new(&buf);
24204        Self::arbitrary(&mut unstructured).unwrap_or_default()
24205    }
24206}
24207impl Default for PARAM_REQUEST_READ_DATA {
24208    fn default() -> Self {
24209        Self::DEFAULT.clone()
24210    }
24211}
24212impl MessageData for PARAM_REQUEST_READ_DATA {
24213    type Message = MavMessage;
24214    const ID: u32 = 20u32;
24215    const NAME: &'static str = "PARAM_REQUEST_READ";
24216    const EXTRA_CRC: u8 = 214u8;
24217    const ENCODED_LEN: usize = 20usize;
24218    fn deser(
24219        _version: MavlinkVersion,
24220        __input: &[u8],
24221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24222        let avail_len = __input.len();
24223        let mut payload_buf = [0; Self::ENCODED_LEN];
24224        let mut buf = if avail_len < Self::ENCODED_LEN {
24225            payload_buf[0..avail_len].copy_from_slice(__input);
24226            Bytes::new(&payload_buf)
24227        } else {
24228            Bytes::new(__input)
24229        };
24230        let mut __struct = Self::default();
24231        __struct.param_index = buf.get_i16_le();
24232        __struct.target_system = buf.get_u8();
24233        __struct.target_component = buf.get_u8();
24234        let mut tmp = [0_u8; 16usize];
24235        for v in &mut tmp {
24236            *v = buf.get_u8();
24237        }
24238        __struct.param_id = CharArray::new(tmp);
24239        Ok(__struct)
24240    }
24241    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24242        let mut __tmp = BytesMut::new(bytes);
24243        #[allow(clippy::absurd_extreme_comparisons)]
24244        #[allow(unused_comparisons)]
24245        if __tmp.remaining() < Self::ENCODED_LEN {
24246            panic!(
24247                "buffer is too small (need {} bytes, but got {})",
24248                Self::ENCODED_LEN,
24249                __tmp.remaining(),
24250            )
24251        }
24252        __tmp.put_i16_le(self.param_index);
24253        __tmp.put_u8(self.target_system);
24254        __tmp.put_u8(self.target_component);
24255        for val in &self.param_id {
24256            __tmp.put_u8(*val);
24257        }
24258        if matches!(version, MavlinkVersion::V2) {
24259            let len = __tmp.len();
24260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24261        } else {
24262            __tmp.len()
24263        }
24264    }
24265}
24266#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24267#[doc = ""]
24268#[doc = "ID: 23"]
24269#[derive(Debug, Clone, PartialEq)]
24270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24272#[cfg_attr(feature = "ts", derive(TS))]
24273#[cfg_attr(feature = "ts", ts(export))]
24274pub struct PARAM_SET_DATA {
24275    #[doc = "Onboard parameter value"]
24276    pub param_value: f32,
24277    #[doc = "System ID"]
24278    pub target_system: u8,
24279    #[doc = "Component ID"]
24280    pub target_component: u8,
24281    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24282    #[cfg_attr(feature = "ts", ts(type = "string"))]
24283    pub param_id: CharArray<16>,
24284    #[doc = "Onboard parameter type."]
24285    pub param_type: MavParamType,
24286}
24287impl PARAM_SET_DATA {
24288    pub const ENCODED_LEN: usize = 23usize;
24289    pub const DEFAULT: Self = Self {
24290        param_value: 0.0_f32,
24291        target_system: 0_u8,
24292        target_component: 0_u8,
24293        param_id: CharArray::new([0_u8; 16usize]),
24294        param_type: MavParamType::DEFAULT,
24295    };
24296    #[cfg(feature = "arbitrary")]
24297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24298        use arbitrary::{Arbitrary, Unstructured};
24299        let mut buf = [0u8; 1024];
24300        rng.fill_bytes(&mut buf);
24301        let mut unstructured = Unstructured::new(&buf);
24302        Self::arbitrary(&mut unstructured).unwrap_or_default()
24303    }
24304}
24305impl Default for PARAM_SET_DATA {
24306    fn default() -> Self {
24307        Self::DEFAULT.clone()
24308    }
24309}
24310impl MessageData for PARAM_SET_DATA {
24311    type Message = MavMessage;
24312    const ID: u32 = 23u32;
24313    const NAME: &'static str = "PARAM_SET";
24314    const EXTRA_CRC: u8 = 168u8;
24315    const ENCODED_LEN: usize = 23usize;
24316    fn deser(
24317        _version: MavlinkVersion,
24318        __input: &[u8],
24319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24320        let avail_len = __input.len();
24321        let mut payload_buf = [0; Self::ENCODED_LEN];
24322        let mut buf = if avail_len < Self::ENCODED_LEN {
24323            payload_buf[0..avail_len].copy_from_slice(__input);
24324            Bytes::new(&payload_buf)
24325        } else {
24326            Bytes::new(__input)
24327        };
24328        let mut __struct = Self::default();
24329        __struct.param_value = buf.get_f32_le();
24330        __struct.target_system = buf.get_u8();
24331        __struct.target_component = buf.get_u8();
24332        let mut tmp = [0_u8; 16usize];
24333        for v in &mut tmp {
24334            *v = buf.get_u8();
24335        }
24336        __struct.param_id = CharArray::new(tmp);
24337        let tmp = buf.get_u8();
24338        __struct.param_type =
24339            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24340                enum_type: "MavParamType",
24341                value: tmp as u32,
24342            })?;
24343        Ok(__struct)
24344    }
24345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24346        let mut __tmp = BytesMut::new(bytes);
24347        #[allow(clippy::absurd_extreme_comparisons)]
24348        #[allow(unused_comparisons)]
24349        if __tmp.remaining() < Self::ENCODED_LEN {
24350            panic!(
24351                "buffer is too small (need {} bytes, but got {})",
24352                Self::ENCODED_LEN,
24353                __tmp.remaining(),
24354            )
24355        }
24356        __tmp.put_f32_le(self.param_value);
24357        __tmp.put_u8(self.target_system);
24358        __tmp.put_u8(self.target_component);
24359        for val in &self.param_id {
24360            __tmp.put_u8(*val);
24361        }
24362        __tmp.put_u8(self.param_type as u8);
24363        if matches!(version, MavlinkVersion::V2) {
24364            let len = __tmp.len();
24365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24366        } else {
24367            __tmp.len()
24368        }
24369    }
24370}
24371#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24372#[doc = ""]
24373#[doc = "ID: 22"]
24374#[derive(Debug, Clone, PartialEq)]
24375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24377#[cfg_attr(feature = "ts", derive(TS))]
24378#[cfg_attr(feature = "ts", ts(export))]
24379pub struct PARAM_VALUE_DATA {
24380    #[doc = "Onboard parameter value"]
24381    pub param_value: f32,
24382    #[doc = "Total number of onboard parameters"]
24383    pub param_count: u16,
24384    #[doc = "Index of this onboard parameter"]
24385    pub param_index: u16,
24386    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24387    #[cfg_attr(feature = "ts", ts(type = "string"))]
24388    pub param_id: CharArray<16>,
24389    #[doc = "Onboard parameter type."]
24390    pub param_type: MavParamType,
24391}
24392impl PARAM_VALUE_DATA {
24393    pub const ENCODED_LEN: usize = 25usize;
24394    pub const DEFAULT: Self = Self {
24395        param_value: 0.0_f32,
24396        param_count: 0_u16,
24397        param_index: 0_u16,
24398        param_id: CharArray::new([0_u8; 16usize]),
24399        param_type: MavParamType::DEFAULT,
24400    };
24401    #[cfg(feature = "arbitrary")]
24402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24403        use arbitrary::{Arbitrary, Unstructured};
24404        let mut buf = [0u8; 1024];
24405        rng.fill_bytes(&mut buf);
24406        let mut unstructured = Unstructured::new(&buf);
24407        Self::arbitrary(&mut unstructured).unwrap_or_default()
24408    }
24409}
24410impl Default for PARAM_VALUE_DATA {
24411    fn default() -> Self {
24412        Self::DEFAULT.clone()
24413    }
24414}
24415impl MessageData for PARAM_VALUE_DATA {
24416    type Message = MavMessage;
24417    const ID: u32 = 22u32;
24418    const NAME: &'static str = "PARAM_VALUE";
24419    const EXTRA_CRC: u8 = 220u8;
24420    const ENCODED_LEN: usize = 25usize;
24421    fn deser(
24422        _version: MavlinkVersion,
24423        __input: &[u8],
24424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24425        let avail_len = __input.len();
24426        let mut payload_buf = [0; Self::ENCODED_LEN];
24427        let mut buf = if avail_len < Self::ENCODED_LEN {
24428            payload_buf[0..avail_len].copy_from_slice(__input);
24429            Bytes::new(&payload_buf)
24430        } else {
24431            Bytes::new(__input)
24432        };
24433        let mut __struct = Self::default();
24434        __struct.param_value = buf.get_f32_le();
24435        __struct.param_count = buf.get_u16_le();
24436        __struct.param_index = buf.get_u16_le();
24437        let mut tmp = [0_u8; 16usize];
24438        for v in &mut tmp {
24439            *v = buf.get_u8();
24440        }
24441        __struct.param_id = CharArray::new(tmp);
24442        let tmp = buf.get_u8();
24443        __struct.param_type =
24444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24445                enum_type: "MavParamType",
24446                value: tmp as u32,
24447            })?;
24448        Ok(__struct)
24449    }
24450    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24451        let mut __tmp = BytesMut::new(bytes);
24452        #[allow(clippy::absurd_extreme_comparisons)]
24453        #[allow(unused_comparisons)]
24454        if __tmp.remaining() < Self::ENCODED_LEN {
24455            panic!(
24456                "buffer is too small (need {} bytes, but got {})",
24457                Self::ENCODED_LEN,
24458                __tmp.remaining(),
24459            )
24460        }
24461        __tmp.put_f32_le(self.param_value);
24462        __tmp.put_u16_le(self.param_count);
24463        __tmp.put_u16_le(self.param_index);
24464        for val in &self.param_id {
24465            __tmp.put_u8(*val);
24466        }
24467        __tmp.put_u8(self.param_type as u8);
24468        if matches!(version, MavlinkVersion::V2) {
24469            let len = __tmp.len();
24470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24471        } else {
24472            __tmp.len()
24473        }
24474    }
24475}
24476#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24477#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24478#[doc = ""]
24479#[doc = "ID: 4"]
24480#[derive(Debug, Clone, PartialEq)]
24481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24483#[cfg_attr(feature = "ts", derive(TS))]
24484#[cfg_attr(feature = "ts", ts(export))]
24485pub struct PING_DATA {
24486    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24487    pub time_usec: u64,
24488    #[doc = "PING sequence"]
24489    pub seq: u32,
24490    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24491    pub target_system: u8,
24492    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24493    pub target_component: u8,
24494}
24495impl PING_DATA {
24496    pub const ENCODED_LEN: usize = 14usize;
24497    pub const DEFAULT: Self = Self {
24498        time_usec: 0_u64,
24499        seq: 0_u32,
24500        target_system: 0_u8,
24501        target_component: 0_u8,
24502    };
24503    #[cfg(feature = "arbitrary")]
24504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24505        use arbitrary::{Arbitrary, Unstructured};
24506        let mut buf = [0u8; 1024];
24507        rng.fill_bytes(&mut buf);
24508        let mut unstructured = Unstructured::new(&buf);
24509        Self::arbitrary(&mut unstructured).unwrap_or_default()
24510    }
24511}
24512impl Default for PING_DATA {
24513    fn default() -> Self {
24514        Self::DEFAULT.clone()
24515    }
24516}
24517impl MessageData for PING_DATA {
24518    type Message = MavMessage;
24519    const ID: u32 = 4u32;
24520    const NAME: &'static str = "PING";
24521    const EXTRA_CRC: u8 = 237u8;
24522    const ENCODED_LEN: usize = 14usize;
24523    fn deser(
24524        _version: MavlinkVersion,
24525        __input: &[u8],
24526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24527        let avail_len = __input.len();
24528        let mut payload_buf = [0; Self::ENCODED_LEN];
24529        let mut buf = if avail_len < Self::ENCODED_LEN {
24530            payload_buf[0..avail_len].copy_from_slice(__input);
24531            Bytes::new(&payload_buf)
24532        } else {
24533            Bytes::new(__input)
24534        };
24535        let mut __struct = Self::default();
24536        __struct.time_usec = buf.get_u64_le();
24537        __struct.seq = buf.get_u32_le();
24538        __struct.target_system = buf.get_u8();
24539        __struct.target_component = buf.get_u8();
24540        Ok(__struct)
24541    }
24542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24543        let mut __tmp = BytesMut::new(bytes);
24544        #[allow(clippy::absurd_extreme_comparisons)]
24545        #[allow(unused_comparisons)]
24546        if __tmp.remaining() < Self::ENCODED_LEN {
24547            panic!(
24548                "buffer is too small (need {} bytes, but got {})",
24549                Self::ENCODED_LEN,
24550                __tmp.remaining(),
24551            )
24552        }
24553        __tmp.put_u64_le(self.time_usec);
24554        __tmp.put_u32_le(self.seq);
24555        __tmp.put_u8(self.target_system);
24556        __tmp.put_u8(self.target_component);
24557        if matches!(version, MavlinkVersion::V2) {
24558            let len = __tmp.len();
24559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24560        } else {
24561            __tmp.len()
24562        }
24563    }
24564}
24565#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24566#[doc = "Control vehicle tone generation (buzzer)."]
24567#[doc = ""]
24568#[doc = "ID: 258"]
24569#[derive(Debug, Clone, PartialEq)]
24570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24572#[cfg_attr(feature = "ts", derive(TS))]
24573#[cfg_attr(feature = "ts", ts(export))]
24574pub struct PLAY_TUNE_DATA {
24575    #[doc = "System ID"]
24576    pub target_system: u8,
24577    #[doc = "Component ID"]
24578    pub target_component: u8,
24579    #[doc = "tune in board specific format"]
24580    #[cfg_attr(feature = "ts", ts(type = "string"))]
24581    pub tune: CharArray<30>,
24582    #[doc = "tune extension (appended to tune)"]
24583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24584    #[cfg_attr(feature = "ts", ts(type = "string"))]
24585    pub tune2: CharArray<200>,
24586}
24587impl PLAY_TUNE_DATA {
24588    pub const ENCODED_LEN: usize = 232usize;
24589    pub const DEFAULT: Self = Self {
24590        target_system: 0_u8,
24591        target_component: 0_u8,
24592        tune: CharArray::new([0_u8; 30usize]),
24593        tune2: CharArray::new([0_u8; 200usize]),
24594    };
24595    #[cfg(feature = "arbitrary")]
24596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24597        use arbitrary::{Arbitrary, Unstructured};
24598        let mut buf = [0u8; 1024];
24599        rng.fill_bytes(&mut buf);
24600        let mut unstructured = Unstructured::new(&buf);
24601        Self::arbitrary(&mut unstructured).unwrap_or_default()
24602    }
24603}
24604impl Default for PLAY_TUNE_DATA {
24605    fn default() -> Self {
24606        Self::DEFAULT.clone()
24607    }
24608}
24609impl MessageData for PLAY_TUNE_DATA {
24610    type Message = MavMessage;
24611    const ID: u32 = 258u32;
24612    const NAME: &'static str = "PLAY_TUNE";
24613    const EXTRA_CRC: u8 = 187u8;
24614    const ENCODED_LEN: usize = 232usize;
24615    fn deser(
24616        _version: MavlinkVersion,
24617        __input: &[u8],
24618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24619        let avail_len = __input.len();
24620        let mut payload_buf = [0; Self::ENCODED_LEN];
24621        let mut buf = if avail_len < Self::ENCODED_LEN {
24622            payload_buf[0..avail_len].copy_from_slice(__input);
24623            Bytes::new(&payload_buf)
24624        } else {
24625            Bytes::new(__input)
24626        };
24627        let mut __struct = Self::default();
24628        __struct.target_system = buf.get_u8();
24629        __struct.target_component = buf.get_u8();
24630        let mut tmp = [0_u8; 30usize];
24631        for v in &mut tmp {
24632            *v = buf.get_u8();
24633        }
24634        __struct.tune = CharArray::new(tmp);
24635        let mut tmp = [0_u8; 200usize];
24636        for v in &mut tmp {
24637            *v = buf.get_u8();
24638        }
24639        __struct.tune2 = CharArray::new(tmp);
24640        Ok(__struct)
24641    }
24642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24643        let mut __tmp = BytesMut::new(bytes);
24644        #[allow(clippy::absurd_extreme_comparisons)]
24645        #[allow(unused_comparisons)]
24646        if __tmp.remaining() < Self::ENCODED_LEN {
24647            panic!(
24648                "buffer is too small (need {} bytes, but got {})",
24649                Self::ENCODED_LEN,
24650                __tmp.remaining(),
24651            )
24652        }
24653        __tmp.put_u8(self.target_system);
24654        __tmp.put_u8(self.target_component);
24655        for val in &self.tune {
24656            __tmp.put_u8(*val);
24657        }
24658        if matches!(version, MavlinkVersion::V2) {
24659            for val in &self.tune2 {
24660                __tmp.put_u8(*val);
24661            }
24662            let len = __tmp.len();
24663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24664        } else {
24665            __tmp.len()
24666        }
24667    }
24668}
24669#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24670#[doc = ""]
24671#[doc = "ID: 400"]
24672#[derive(Debug, Clone, PartialEq)]
24673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24675#[cfg_attr(feature = "ts", derive(TS))]
24676#[cfg_attr(feature = "ts", ts(export))]
24677pub struct PLAY_TUNE_V2_DATA {
24678    #[doc = "Tune format"]
24679    pub format: TuneFormat,
24680    #[doc = "System ID"]
24681    pub target_system: u8,
24682    #[doc = "Component ID"]
24683    pub target_component: u8,
24684    #[doc = "Tune definition as a NULL-terminated string."]
24685    #[cfg_attr(feature = "ts", ts(type = "string"))]
24686    pub tune: CharArray<248>,
24687}
24688impl PLAY_TUNE_V2_DATA {
24689    pub const ENCODED_LEN: usize = 254usize;
24690    pub const DEFAULT: Self = Self {
24691        format: TuneFormat::DEFAULT,
24692        target_system: 0_u8,
24693        target_component: 0_u8,
24694        tune: CharArray::new([0_u8; 248usize]),
24695    };
24696    #[cfg(feature = "arbitrary")]
24697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24698        use arbitrary::{Arbitrary, Unstructured};
24699        let mut buf = [0u8; 1024];
24700        rng.fill_bytes(&mut buf);
24701        let mut unstructured = Unstructured::new(&buf);
24702        Self::arbitrary(&mut unstructured).unwrap_or_default()
24703    }
24704}
24705impl Default for PLAY_TUNE_V2_DATA {
24706    fn default() -> Self {
24707        Self::DEFAULT.clone()
24708    }
24709}
24710impl MessageData for PLAY_TUNE_V2_DATA {
24711    type Message = MavMessage;
24712    const ID: u32 = 400u32;
24713    const NAME: &'static str = "PLAY_TUNE_V2";
24714    const EXTRA_CRC: u8 = 110u8;
24715    const ENCODED_LEN: usize = 254usize;
24716    fn deser(
24717        _version: MavlinkVersion,
24718        __input: &[u8],
24719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24720        let avail_len = __input.len();
24721        let mut payload_buf = [0; Self::ENCODED_LEN];
24722        let mut buf = if avail_len < Self::ENCODED_LEN {
24723            payload_buf[0..avail_len].copy_from_slice(__input);
24724            Bytes::new(&payload_buf)
24725        } else {
24726            Bytes::new(__input)
24727        };
24728        let mut __struct = Self::default();
24729        let tmp = buf.get_u32_le();
24730        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24731            ::mavlink_core::error::ParserError::InvalidEnum {
24732                enum_type: "TuneFormat",
24733                value: tmp as u32,
24734            },
24735        )?;
24736        __struct.target_system = buf.get_u8();
24737        __struct.target_component = buf.get_u8();
24738        let mut tmp = [0_u8; 248usize];
24739        for v in &mut tmp {
24740            *v = buf.get_u8();
24741        }
24742        __struct.tune = CharArray::new(tmp);
24743        Ok(__struct)
24744    }
24745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24746        let mut __tmp = BytesMut::new(bytes);
24747        #[allow(clippy::absurd_extreme_comparisons)]
24748        #[allow(unused_comparisons)]
24749        if __tmp.remaining() < Self::ENCODED_LEN {
24750            panic!(
24751                "buffer is too small (need {} bytes, but got {})",
24752                Self::ENCODED_LEN,
24753                __tmp.remaining(),
24754            )
24755        }
24756        __tmp.put_u32_le(self.format as u32);
24757        __tmp.put_u8(self.target_system);
24758        __tmp.put_u8(self.target_component);
24759        for val in &self.tune {
24760            __tmp.put_u8(*val);
24761        }
24762        if matches!(version, MavlinkVersion::V2) {
24763            let len = __tmp.len();
24764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24765        } else {
24766            __tmp.len()
24767        }
24768    }
24769}
24770#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24771#[doc = ""]
24772#[doc = "ID: 87"]
24773#[derive(Debug, Clone, PartialEq)]
24774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24776#[cfg_attr(feature = "ts", derive(TS))]
24777#[cfg_attr(feature = "ts", ts(export))]
24778pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24779    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24780    pub time_boot_ms: u32,
24781    #[doc = "Latitude in WGS84 frame"]
24782    pub lat_int: i32,
24783    #[doc = "Longitude in WGS84 frame"]
24784    pub lon_int: i32,
24785    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24786    pub alt: f32,
24787    #[doc = "X velocity in NED frame"]
24788    pub vx: f32,
24789    #[doc = "Y velocity in NED frame"]
24790    pub vy: f32,
24791    #[doc = "Z velocity in NED frame"]
24792    pub vz: f32,
24793    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24794    pub afx: f32,
24795    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24796    pub afy: f32,
24797    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24798    pub afz: f32,
24799    #[doc = "yaw setpoint"]
24800    pub yaw: f32,
24801    #[doc = "yaw rate setpoint"]
24802    pub yaw_rate: f32,
24803    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24804    pub type_mask: PositionTargetTypemask,
24805    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24806    pub coordinate_frame: MavFrame,
24807}
24808impl POSITION_TARGET_GLOBAL_INT_DATA {
24809    pub const ENCODED_LEN: usize = 51usize;
24810    pub const DEFAULT: Self = Self {
24811        time_boot_ms: 0_u32,
24812        lat_int: 0_i32,
24813        lon_int: 0_i32,
24814        alt: 0.0_f32,
24815        vx: 0.0_f32,
24816        vy: 0.0_f32,
24817        vz: 0.0_f32,
24818        afx: 0.0_f32,
24819        afy: 0.0_f32,
24820        afz: 0.0_f32,
24821        yaw: 0.0_f32,
24822        yaw_rate: 0.0_f32,
24823        type_mask: PositionTargetTypemask::DEFAULT,
24824        coordinate_frame: MavFrame::DEFAULT,
24825    };
24826    #[cfg(feature = "arbitrary")]
24827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24828        use arbitrary::{Arbitrary, Unstructured};
24829        let mut buf = [0u8; 1024];
24830        rng.fill_bytes(&mut buf);
24831        let mut unstructured = Unstructured::new(&buf);
24832        Self::arbitrary(&mut unstructured).unwrap_or_default()
24833    }
24834}
24835impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24836    fn default() -> Self {
24837        Self::DEFAULT.clone()
24838    }
24839}
24840impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24841    type Message = MavMessage;
24842    const ID: u32 = 87u32;
24843    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24844    const EXTRA_CRC: u8 = 150u8;
24845    const ENCODED_LEN: usize = 51usize;
24846    fn deser(
24847        _version: MavlinkVersion,
24848        __input: &[u8],
24849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24850        let avail_len = __input.len();
24851        let mut payload_buf = [0; Self::ENCODED_LEN];
24852        let mut buf = if avail_len < Self::ENCODED_LEN {
24853            payload_buf[0..avail_len].copy_from_slice(__input);
24854            Bytes::new(&payload_buf)
24855        } else {
24856            Bytes::new(__input)
24857        };
24858        let mut __struct = Self::default();
24859        __struct.time_boot_ms = buf.get_u32_le();
24860        __struct.lat_int = buf.get_i32_le();
24861        __struct.lon_int = buf.get_i32_le();
24862        __struct.alt = buf.get_f32_le();
24863        __struct.vx = buf.get_f32_le();
24864        __struct.vy = buf.get_f32_le();
24865        __struct.vz = buf.get_f32_le();
24866        __struct.afx = buf.get_f32_le();
24867        __struct.afy = buf.get_f32_le();
24868        __struct.afz = buf.get_f32_le();
24869        __struct.yaw = buf.get_f32_le();
24870        __struct.yaw_rate = buf.get_f32_le();
24871        let tmp = buf.get_u16_le();
24872        __struct.type_mask = PositionTargetTypemask::from_bits(
24873            tmp & PositionTargetTypemask::all().bits(),
24874        )
24875        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24876            flag_type: "PositionTargetTypemask",
24877            value: tmp as u32,
24878        })?;
24879        let tmp = buf.get_u8();
24880        __struct.coordinate_frame =
24881            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24882                enum_type: "MavFrame",
24883                value: tmp as u32,
24884            })?;
24885        Ok(__struct)
24886    }
24887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24888        let mut __tmp = BytesMut::new(bytes);
24889        #[allow(clippy::absurd_extreme_comparisons)]
24890        #[allow(unused_comparisons)]
24891        if __tmp.remaining() < Self::ENCODED_LEN {
24892            panic!(
24893                "buffer is too small (need {} bytes, but got {})",
24894                Self::ENCODED_LEN,
24895                __tmp.remaining(),
24896            )
24897        }
24898        __tmp.put_u32_le(self.time_boot_ms);
24899        __tmp.put_i32_le(self.lat_int);
24900        __tmp.put_i32_le(self.lon_int);
24901        __tmp.put_f32_le(self.alt);
24902        __tmp.put_f32_le(self.vx);
24903        __tmp.put_f32_le(self.vy);
24904        __tmp.put_f32_le(self.vz);
24905        __tmp.put_f32_le(self.afx);
24906        __tmp.put_f32_le(self.afy);
24907        __tmp.put_f32_le(self.afz);
24908        __tmp.put_f32_le(self.yaw);
24909        __tmp.put_f32_le(self.yaw_rate);
24910        __tmp.put_u16_le(self.type_mask.bits());
24911        __tmp.put_u8(self.coordinate_frame as u8);
24912        if matches!(version, MavlinkVersion::V2) {
24913            let len = __tmp.len();
24914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24915        } else {
24916            __tmp.len()
24917        }
24918    }
24919}
24920#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24921#[doc = ""]
24922#[doc = "ID: 85"]
24923#[derive(Debug, Clone, PartialEq)]
24924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24926#[cfg_attr(feature = "ts", derive(TS))]
24927#[cfg_attr(feature = "ts", ts(export))]
24928pub struct POSITION_TARGET_LOCAL_NED_DATA {
24929    #[doc = "Timestamp (time since system boot)."]
24930    pub time_boot_ms: u32,
24931    #[doc = "X Position in NED frame"]
24932    pub x: f32,
24933    #[doc = "Y Position in NED frame"]
24934    pub y: f32,
24935    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24936    pub z: f32,
24937    #[doc = "X velocity in NED frame"]
24938    pub vx: f32,
24939    #[doc = "Y velocity in NED frame"]
24940    pub vy: f32,
24941    #[doc = "Z velocity in NED frame"]
24942    pub vz: f32,
24943    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24944    pub afx: f32,
24945    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24946    pub afy: f32,
24947    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24948    pub afz: f32,
24949    #[doc = "yaw setpoint"]
24950    pub yaw: f32,
24951    #[doc = "yaw rate setpoint"]
24952    pub yaw_rate: f32,
24953    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24954    pub type_mask: PositionTargetTypemask,
24955    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24956    pub coordinate_frame: MavFrame,
24957}
24958impl POSITION_TARGET_LOCAL_NED_DATA {
24959    pub const ENCODED_LEN: usize = 51usize;
24960    pub const DEFAULT: Self = Self {
24961        time_boot_ms: 0_u32,
24962        x: 0.0_f32,
24963        y: 0.0_f32,
24964        z: 0.0_f32,
24965        vx: 0.0_f32,
24966        vy: 0.0_f32,
24967        vz: 0.0_f32,
24968        afx: 0.0_f32,
24969        afy: 0.0_f32,
24970        afz: 0.0_f32,
24971        yaw: 0.0_f32,
24972        yaw_rate: 0.0_f32,
24973        type_mask: PositionTargetTypemask::DEFAULT,
24974        coordinate_frame: MavFrame::DEFAULT,
24975    };
24976    #[cfg(feature = "arbitrary")]
24977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24978        use arbitrary::{Arbitrary, Unstructured};
24979        let mut buf = [0u8; 1024];
24980        rng.fill_bytes(&mut buf);
24981        let mut unstructured = Unstructured::new(&buf);
24982        Self::arbitrary(&mut unstructured).unwrap_or_default()
24983    }
24984}
24985impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24986    fn default() -> Self {
24987        Self::DEFAULT.clone()
24988    }
24989}
24990impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24991    type Message = MavMessage;
24992    const ID: u32 = 85u32;
24993    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24994    const EXTRA_CRC: u8 = 140u8;
24995    const ENCODED_LEN: usize = 51usize;
24996    fn deser(
24997        _version: MavlinkVersion,
24998        __input: &[u8],
24999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25000        let avail_len = __input.len();
25001        let mut payload_buf = [0; Self::ENCODED_LEN];
25002        let mut buf = if avail_len < Self::ENCODED_LEN {
25003            payload_buf[0..avail_len].copy_from_slice(__input);
25004            Bytes::new(&payload_buf)
25005        } else {
25006            Bytes::new(__input)
25007        };
25008        let mut __struct = Self::default();
25009        __struct.time_boot_ms = buf.get_u32_le();
25010        __struct.x = buf.get_f32_le();
25011        __struct.y = buf.get_f32_le();
25012        __struct.z = buf.get_f32_le();
25013        __struct.vx = buf.get_f32_le();
25014        __struct.vy = buf.get_f32_le();
25015        __struct.vz = buf.get_f32_le();
25016        __struct.afx = buf.get_f32_le();
25017        __struct.afy = buf.get_f32_le();
25018        __struct.afz = buf.get_f32_le();
25019        __struct.yaw = buf.get_f32_le();
25020        __struct.yaw_rate = buf.get_f32_le();
25021        let tmp = buf.get_u16_le();
25022        __struct.type_mask = PositionTargetTypemask::from_bits(
25023            tmp & PositionTargetTypemask::all().bits(),
25024        )
25025        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25026            flag_type: "PositionTargetTypemask",
25027            value: tmp as u32,
25028        })?;
25029        let tmp = buf.get_u8();
25030        __struct.coordinate_frame =
25031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25032                enum_type: "MavFrame",
25033                value: tmp as u32,
25034            })?;
25035        Ok(__struct)
25036    }
25037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25038        let mut __tmp = BytesMut::new(bytes);
25039        #[allow(clippy::absurd_extreme_comparisons)]
25040        #[allow(unused_comparisons)]
25041        if __tmp.remaining() < Self::ENCODED_LEN {
25042            panic!(
25043                "buffer is too small (need {} bytes, but got {})",
25044                Self::ENCODED_LEN,
25045                __tmp.remaining(),
25046            )
25047        }
25048        __tmp.put_u32_le(self.time_boot_ms);
25049        __tmp.put_f32_le(self.x);
25050        __tmp.put_f32_le(self.y);
25051        __tmp.put_f32_le(self.z);
25052        __tmp.put_f32_le(self.vx);
25053        __tmp.put_f32_le(self.vy);
25054        __tmp.put_f32_le(self.vz);
25055        __tmp.put_f32_le(self.afx);
25056        __tmp.put_f32_le(self.afy);
25057        __tmp.put_f32_le(self.afz);
25058        __tmp.put_f32_le(self.yaw);
25059        __tmp.put_f32_le(self.yaw_rate);
25060        __tmp.put_u16_le(self.type_mask.bits());
25061        __tmp.put_u8(self.coordinate_frame as u8);
25062        if matches!(version, MavlinkVersion::V2) {
25063            let len = __tmp.len();
25064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25065        } else {
25066            __tmp.len()
25067        }
25068    }
25069}
25070#[doc = "Power supply status."]
25071#[doc = ""]
25072#[doc = "ID: 125"]
25073#[derive(Debug, Clone, PartialEq)]
25074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25076#[cfg_attr(feature = "ts", derive(TS))]
25077#[cfg_attr(feature = "ts", ts(export))]
25078pub struct POWER_STATUS_DATA {
25079    #[doc = "5V rail voltage."]
25080    pub Vcc: u16,
25081    #[doc = "Servo rail voltage."]
25082    pub Vservo: u16,
25083    #[doc = "Bitmap of power supply status flags."]
25084    pub flags: MavPowerStatus,
25085}
25086impl POWER_STATUS_DATA {
25087    pub const ENCODED_LEN: usize = 6usize;
25088    pub const DEFAULT: Self = Self {
25089        Vcc: 0_u16,
25090        Vservo: 0_u16,
25091        flags: MavPowerStatus::DEFAULT,
25092    };
25093    #[cfg(feature = "arbitrary")]
25094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25095        use arbitrary::{Arbitrary, Unstructured};
25096        let mut buf = [0u8; 1024];
25097        rng.fill_bytes(&mut buf);
25098        let mut unstructured = Unstructured::new(&buf);
25099        Self::arbitrary(&mut unstructured).unwrap_or_default()
25100    }
25101}
25102impl Default for POWER_STATUS_DATA {
25103    fn default() -> Self {
25104        Self::DEFAULT.clone()
25105    }
25106}
25107impl MessageData for POWER_STATUS_DATA {
25108    type Message = MavMessage;
25109    const ID: u32 = 125u32;
25110    const NAME: &'static str = "POWER_STATUS";
25111    const EXTRA_CRC: u8 = 203u8;
25112    const ENCODED_LEN: usize = 6usize;
25113    fn deser(
25114        _version: MavlinkVersion,
25115        __input: &[u8],
25116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25117        let avail_len = __input.len();
25118        let mut payload_buf = [0; Self::ENCODED_LEN];
25119        let mut buf = if avail_len < Self::ENCODED_LEN {
25120            payload_buf[0..avail_len].copy_from_slice(__input);
25121            Bytes::new(&payload_buf)
25122        } else {
25123            Bytes::new(__input)
25124        };
25125        let mut __struct = Self::default();
25126        __struct.Vcc = buf.get_u16_le();
25127        __struct.Vservo = buf.get_u16_le();
25128        let tmp = buf.get_u16_le();
25129        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25130            ::mavlink_core::error::ParserError::InvalidFlag {
25131                flag_type: "MavPowerStatus",
25132                value: tmp as u32,
25133            },
25134        )?;
25135        Ok(__struct)
25136    }
25137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25138        let mut __tmp = BytesMut::new(bytes);
25139        #[allow(clippy::absurd_extreme_comparisons)]
25140        #[allow(unused_comparisons)]
25141        if __tmp.remaining() < Self::ENCODED_LEN {
25142            panic!(
25143                "buffer is too small (need {} bytes, but got {})",
25144                Self::ENCODED_LEN,
25145                __tmp.remaining(),
25146            )
25147        }
25148        __tmp.put_u16_le(self.Vcc);
25149        __tmp.put_u16_le(self.Vservo);
25150        __tmp.put_u16_le(self.flags.bits());
25151        if matches!(version, MavlinkVersion::V2) {
25152            let len = __tmp.len();
25153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25154        } else {
25155            __tmp.len()
25156        }
25157    }
25158}
25159#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25160#[doc = ""]
25161#[doc = "ID: 300"]
25162#[derive(Debug, Clone, PartialEq)]
25163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25165#[cfg_attr(feature = "ts", derive(TS))]
25166#[cfg_attr(feature = "ts", ts(export))]
25167pub struct PROTOCOL_VERSION_DATA {
25168    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25169    pub version: u16,
25170    #[doc = "Minimum MAVLink version supported"]
25171    pub min_version: u16,
25172    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25173    pub max_version: u16,
25174    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25176    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25177    pub spec_version_hash: [u8; 8],
25178    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25180    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25181    pub library_version_hash: [u8; 8],
25182}
25183impl PROTOCOL_VERSION_DATA {
25184    pub const ENCODED_LEN: usize = 22usize;
25185    pub const DEFAULT: Self = Self {
25186        version: 0_u16,
25187        min_version: 0_u16,
25188        max_version: 0_u16,
25189        spec_version_hash: [0_u8; 8usize],
25190        library_version_hash: [0_u8; 8usize],
25191    };
25192    #[cfg(feature = "arbitrary")]
25193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25194        use arbitrary::{Arbitrary, Unstructured};
25195        let mut buf = [0u8; 1024];
25196        rng.fill_bytes(&mut buf);
25197        let mut unstructured = Unstructured::new(&buf);
25198        Self::arbitrary(&mut unstructured).unwrap_or_default()
25199    }
25200}
25201impl Default for PROTOCOL_VERSION_DATA {
25202    fn default() -> Self {
25203        Self::DEFAULT.clone()
25204    }
25205}
25206impl MessageData for PROTOCOL_VERSION_DATA {
25207    type Message = MavMessage;
25208    const ID: u32 = 300u32;
25209    const NAME: &'static str = "PROTOCOL_VERSION";
25210    const EXTRA_CRC: u8 = 217u8;
25211    const ENCODED_LEN: usize = 22usize;
25212    fn deser(
25213        _version: MavlinkVersion,
25214        __input: &[u8],
25215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25216        let avail_len = __input.len();
25217        let mut payload_buf = [0; Self::ENCODED_LEN];
25218        let mut buf = if avail_len < Self::ENCODED_LEN {
25219            payload_buf[0..avail_len].copy_from_slice(__input);
25220            Bytes::new(&payload_buf)
25221        } else {
25222            Bytes::new(__input)
25223        };
25224        let mut __struct = Self::default();
25225        __struct.version = buf.get_u16_le();
25226        __struct.min_version = buf.get_u16_le();
25227        __struct.max_version = buf.get_u16_le();
25228        for v in &mut __struct.spec_version_hash {
25229            let val = buf.get_u8();
25230            *v = val;
25231        }
25232        for v in &mut __struct.library_version_hash {
25233            let val = buf.get_u8();
25234            *v = val;
25235        }
25236        Ok(__struct)
25237    }
25238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25239        let mut __tmp = BytesMut::new(bytes);
25240        #[allow(clippy::absurd_extreme_comparisons)]
25241        #[allow(unused_comparisons)]
25242        if __tmp.remaining() < Self::ENCODED_LEN {
25243            panic!(
25244                "buffer is too small (need {} bytes, but got {})",
25245                Self::ENCODED_LEN,
25246                __tmp.remaining(),
25247            )
25248        }
25249        __tmp.put_u16_le(self.version);
25250        __tmp.put_u16_le(self.min_version);
25251        __tmp.put_u16_le(self.max_version);
25252        for val in &self.spec_version_hash {
25253            __tmp.put_u8(*val);
25254        }
25255        for val in &self.library_version_hash {
25256            __tmp.put_u8(*val);
25257        }
25258        if matches!(version, MavlinkVersion::V2) {
25259            let len = __tmp.len();
25260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25261        } else {
25262            __tmp.len()
25263        }
25264    }
25265}
25266#[doc = "Status generated by radio and injected into MAVLink stream."]
25267#[doc = ""]
25268#[doc = "ID: 109"]
25269#[derive(Debug, Clone, PartialEq)]
25270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25272#[cfg_attr(feature = "ts", derive(TS))]
25273#[cfg_attr(feature = "ts", ts(export))]
25274pub struct RADIO_STATUS_DATA {
25275    #[doc = "Count of radio packet receive errors (since boot)."]
25276    pub rxerrors: u16,
25277    #[doc = "Count of error corrected radio packets (since boot)."]
25278    pub fixed: u16,
25279    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25280    pub rssi: u8,
25281    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25282    pub remrssi: u8,
25283    #[doc = "Remaining free transmitter buffer space."]
25284    pub txbuf: u8,
25285    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25286    pub noise: u8,
25287    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25288    pub remnoise: u8,
25289}
25290impl RADIO_STATUS_DATA {
25291    pub const ENCODED_LEN: usize = 9usize;
25292    pub const DEFAULT: Self = Self {
25293        rxerrors: 0_u16,
25294        fixed: 0_u16,
25295        rssi: 0_u8,
25296        remrssi: 0_u8,
25297        txbuf: 0_u8,
25298        noise: 0_u8,
25299        remnoise: 0_u8,
25300    };
25301    #[cfg(feature = "arbitrary")]
25302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25303        use arbitrary::{Arbitrary, Unstructured};
25304        let mut buf = [0u8; 1024];
25305        rng.fill_bytes(&mut buf);
25306        let mut unstructured = Unstructured::new(&buf);
25307        Self::arbitrary(&mut unstructured).unwrap_or_default()
25308    }
25309}
25310impl Default for RADIO_STATUS_DATA {
25311    fn default() -> Self {
25312        Self::DEFAULT.clone()
25313    }
25314}
25315impl MessageData for RADIO_STATUS_DATA {
25316    type Message = MavMessage;
25317    const ID: u32 = 109u32;
25318    const NAME: &'static str = "RADIO_STATUS";
25319    const EXTRA_CRC: u8 = 185u8;
25320    const ENCODED_LEN: usize = 9usize;
25321    fn deser(
25322        _version: MavlinkVersion,
25323        __input: &[u8],
25324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25325        let avail_len = __input.len();
25326        let mut payload_buf = [0; Self::ENCODED_LEN];
25327        let mut buf = if avail_len < Self::ENCODED_LEN {
25328            payload_buf[0..avail_len].copy_from_slice(__input);
25329            Bytes::new(&payload_buf)
25330        } else {
25331            Bytes::new(__input)
25332        };
25333        let mut __struct = Self::default();
25334        __struct.rxerrors = buf.get_u16_le();
25335        __struct.fixed = buf.get_u16_le();
25336        __struct.rssi = buf.get_u8();
25337        __struct.remrssi = buf.get_u8();
25338        __struct.txbuf = buf.get_u8();
25339        __struct.noise = buf.get_u8();
25340        __struct.remnoise = buf.get_u8();
25341        Ok(__struct)
25342    }
25343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25344        let mut __tmp = BytesMut::new(bytes);
25345        #[allow(clippy::absurd_extreme_comparisons)]
25346        #[allow(unused_comparisons)]
25347        if __tmp.remaining() < Self::ENCODED_LEN {
25348            panic!(
25349                "buffer is too small (need {} bytes, but got {})",
25350                Self::ENCODED_LEN,
25351                __tmp.remaining(),
25352            )
25353        }
25354        __tmp.put_u16_le(self.rxerrors);
25355        __tmp.put_u16_le(self.fixed);
25356        __tmp.put_u8(self.rssi);
25357        __tmp.put_u8(self.remrssi);
25358        __tmp.put_u8(self.txbuf);
25359        __tmp.put_u8(self.noise);
25360        __tmp.put_u8(self.remnoise);
25361        if matches!(version, MavlinkVersion::V2) {
25362            let len = __tmp.len();
25363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25364        } else {
25365            __tmp.len()
25366        }
25367    }
25368}
25369#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25370#[doc = ""]
25371#[doc = "ID: 27"]
25372#[derive(Debug, Clone, PartialEq)]
25373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25375#[cfg_attr(feature = "ts", derive(TS))]
25376#[cfg_attr(feature = "ts", ts(export))]
25377pub struct RAW_IMU_DATA {
25378    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25379    pub time_usec: u64,
25380    #[doc = "X acceleration (raw)"]
25381    pub xacc: i16,
25382    #[doc = "Y acceleration (raw)"]
25383    pub yacc: i16,
25384    #[doc = "Z acceleration (raw)"]
25385    pub zacc: i16,
25386    #[doc = "Angular speed around X axis (raw)"]
25387    pub xgyro: i16,
25388    #[doc = "Angular speed around Y axis (raw)"]
25389    pub ygyro: i16,
25390    #[doc = "Angular speed around Z axis (raw)"]
25391    pub zgyro: i16,
25392    #[doc = "X Magnetic field (raw)"]
25393    pub xmag: i16,
25394    #[doc = "Y Magnetic field (raw)"]
25395    pub ymag: i16,
25396    #[doc = "Z Magnetic field (raw)"]
25397    pub zmag: i16,
25398    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25399    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25400    pub id: u8,
25401    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25403    pub temperature: i16,
25404}
25405impl RAW_IMU_DATA {
25406    pub const ENCODED_LEN: usize = 29usize;
25407    pub const DEFAULT: Self = Self {
25408        time_usec: 0_u64,
25409        xacc: 0_i16,
25410        yacc: 0_i16,
25411        zacc: 0_i16,
25412        xgyro: 0_i16,
25413        ygyro: 0_i16,
25414        zgyro: 0_i16,
25415        xmag: 0_i16,
25416        ymag: 0_i16,
25417        zmag: 0_i16,
25418        id: 0_u8,
25419        temperature: 0_i16,
25420    };
25421    #[cfg(feature = "arbitrary")]
25422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25423        use arbitrary::{Arbitrary, Unstructured};
25424        let mut buf = [0u8; 1024];
25425        rng.fill_bytes(&mut buf);
25426        let mut unstructured = Unstructured::new(&buf);
25427        Self::arbitrary(&mut unstructured).unwrap_or_default()
25428    }
25429}
25430impl Default for RAW_IMU_DATA {
25431    fn default() -> Self {
25432        Self::DEFAULT.clone()
25433    }
25434}
25435impl MessageData for RAW_IMU_DATA {
25436    type Message = MavMessage;
25437    const ID: u32 = 27u32;
25438    const NAME: &'static str = "RAW_IMU";
25439    const EXTRA_CRC: u8 = 144u8;
25440    const ENCODED_LEN: usize = 29usize;
25441    fn deser(
25442        _version: MavlinkVersion,
25443        __input: &[u8],
25444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25445        let avail_len = __input.len();
25446        let mut payload_buf = [0; Self::ENCODED_LEN];
25447        let mut buf = if avail_len < Self::ENCODED_LEN {
25448            payload_buf[0..avail_len].copy_from_slice(__input);
25449            Bytes::new(&payload_buf)
25450        } else {
25451            Bytes::new(__input)
25452        };
25453        let mut __struct = Self::default();
25454        __struct.time_usec = buf.get_u64_le();
25455        __struct.xacc = buf.get_i16_le();
25456        __struct.yacc = buf.get_i16_le();
25457        __struct.zacc = buf.get_i16_le();
25458        __struct.xgyro = buf.get_i16_le();
25459        __struct.ygyro = buf.get_i16_le();
25460        __struct.zgyro = buf.get_i16_le();
25461        __struct.xmag = buf.get_i16_le();
25462        __struct.ymag = buf.get_i16_le();
25463        __struct.zmag = buf.get_i16_le();
25464        __struct.id = buf.get_u8();
25465        __struct.temperature = buf.get_i16_le();
25466        Ok(__struct)
25467    }
25468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25469        let mut __tmp = BytesMut::new(bytes);
25470        #[allow(clippy::absurd_extreme_comparisons)]
25471        #[allow(unused_comparisons)]
25472        if __tmp.remaining() < Self::ENCODED_LEN {
25473            panic!(
25474                "buffer is too small (need {} bytes, but got {})",
25475                Self::ENCODED_LEN,
25476                __tmp.remaining(),
25477            )
25478        }
25479        __tmp.put_u64_le(self.time_usec);
25480        __tmp.put_i16_le(self.xacc);
25481        __tmp.put_i16_le(self.yacc);
25482        __tmp.put_i16_le(self.zacc);
25483        __tmp.put_i16_le(self.xgyro);
25484        __tmp.put_i16_le(self.ygyro);
25485        __tmp.put_i16_le(self.zgyro);
25486        __tmp.put_i16_le(self.xmag);
25487        __tmp.put_i16_le(self.ymag);
25488        __tmp.put_i16_le(self.zmag);
25489        if matches!(version, MavlinkVersion::V2) {
25490            __tmp.put_u8(self.id);
25491            __tmp.put_i16_le(self.temperature);
25492            let len = __tmp.len();
25493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25494        } else {
25495            __tmp.len()
25496        }
25497    }
25498}
25499#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25500#[doc = ""]
25501#[doc = "ID: 28"]
25502#[derive(Debug, Clone, PartialEq)]
25503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25505#[cfg_attr(feature = "ts", derive(TS))]
25506#[cfg_attr(feature = "ts", ts(export))]
25507pub struct RAW_PRESSURE_DATA {
25508    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25509    pub time_usec: u64,
25510    #[doc = "Absolute pressure (raw)"]
25511    pub press_abs: i16,
25512    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25513    pub press_diff1: i16,
25514    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25515    pub press_diff2: i16,
25516    #[doc = "Raw Temperature measurement (raw)"]
25517    pub temperature: i16,
25518}
25519impl RAW_PRESSURE_DATA {
25520    pub const ENCODED_LEN: usize = 16usize;
25521    pub const DEFAULT: Self = Self {
25522        time_usec: 0_u64,
25523        press_abs: 0_i16,
25524        press_diff1: 0_i16,
25525        press_diff2: 0_i16,
25526        temperature: 0_i16,
25527    };
25528    #[cfg(feature = "arbitrary")]
25529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25530        use arbitrary::{Arbitrary, Unstructured};
25531        let mut buf = [0u8; 1024];
25532        rng.fill_bytes(&mut buf);
25533        let mut unstructured = Unstructured::new(&buf);
25534        Self::arbitrary(&mut unstructured).unwrap_or_default()
25535    }
25536}
25537impl Default for RAW_PRESSURE_DATA {
25538    fn default() -> Self {
25539        Self::DEFAULT.clone()
25540    }
25541}
25542impl MessageData for RAW_PRESSURE_DATA {
25543    type Message = MavMessage;
25544    const ID: u32 = 28u32;
25545    const NAME: &'static str = "RAW_PRESSURE";
25546    const EXTRA_CRC: u8 = 67u8;
25547    const ENCODED_LEN: usize = 16usize;
25548    fn deser(
25549        _version: MavlinkVersion,
25550        __input: &[u8],
25551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25552        let avail_len = __input.len();
25553        let mut payload_buf = [0; Self::ENCODED_LEN];
25554        let mut buf = if avail_len < Self::ENCODED_LEN {
25555            payload_buf[0..avail_len].copy_from_slice(__input);
25556            Bytes::new(&payload_buf)
25557        } else {
25558            Bytes::new(__input)
25559        };
25560        let mut __struct = Self::default();
25561        __struct.time_usec = buf.get_u64_le();
25562        __struct.press_abs = buf.get_i16_le();
25563        __struct.press_diff1 = buf.get_i16_le();
25564        __struct.press_diff2 = buf.get_i16_le();
25565        __struct.temperature = buf.get_i16_le();
25566        Ok(__struct)
25567    }
25568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25569        let mut __tmp = BytesMut::new(bytes);
25570        #[allow(clippy::absurd_extreme_comparisons)]
25571        #[allow(unused_comparisons)]
25572        if __tmp.remaining() < Self::ENCODED_LEN {
25573            panic!(
25574                "buffer is too small (need {} bytes, but got {})",
25575                Self::ENCODED_LEN,
25576                __tmp.remaining(),
25577            )
25578        }
25579        __tmp.put_u64_le(self.time_usec);
25580        __tmp.put_i16_le(self.press_abs);
25581        __tmp.put_i16_le(self.press_diff1);
25582        __tmp.put_i16_le(self.press_diff2);
25583        __tmp.put_i16_le(self.temperature);
25584        if matches!(version, MavlinkVersion::V2) {
25585            let len = __tmp.len();
25586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25587        } else {
25588            __tmp.len()
25589        }
25590    }
25591}
25592#[doc = "RPM sensor data message."]
25593#[doc = ""]
25594#[doc = "ID: 339"]
25595#[derive(Debug, Clone, PartialEq)]
25596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25598#[cfg_attr(feature = "ts", derive(TS))]
25599#[cfg_attr(feature = "ts", ts(export))]
25600pub struct RAW_RPM_DATA {
25601    #[doc = "Indicated rate"]
25602    pub frequency: f32,
25603    #[doc = "Index of this RPM sensor (0-indexed)"]
25604    pub index: u8,
25605}
25606impl RAW_RPM_DATA {
25607    pub const ENCODED_LEN: usize = 5usize;
25608    pub const DEFAULT: Self = Self {
25609        frequency: 0.0_f32,
25610        index: 0_u8,
25611    };
25612    #[cfg(feature = "arbitrary")]
25613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25614        use arbitrary::{Arbitrary, Unstructured};
25615        let mut buf = [0u8; 1024];
25616        rng.fill_bytes(&mut buf);
25617        let mut unstructured = Unstructured::new(&buf);
25618        Self::arbitrary(&mut unstructured).unwrap_or_default()
25619    }
25620}
25621impl Default for RAW_RPM_DATA {
25622    fn default() -> Self {
25623        Self::DEFAULT.clone()
25624    }
25625}
25626impl MessageData for RAW_RPM_DATA {
25627    type Message = MavMessage;
25628    const ID: u32 = 339u32;
25629    const NAME: &'static str = "RAW_RPM";
25630    const EXTRA_CRC: u8 = 199u8;
25631    const ENCODED_LEN: usize = 5usize;
25632    fn deser(
25633        _version: MavlinkVersion,
25634        __input: &[u8],
25635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25636        let avail_len = __input.len();
25637        let mut payload_buf = [0; Self::ENCODED_LEN];
25638        let mut buf = if avail_len < Self::ENCODED_LEN {
25639            payload_buf[0..avail_len].copy_from_slice(__input);
25640            Bytes::new(&payload_buf)
25641        } else {
25642            Bytes::new(__input)
25643        };
25644        let mut __struct = Self::default();
25645        __struct.frequency = buf.get_f32_le();
25646        __struct.index = buf.get_u8();
25647        Ok(__struct)
25648    }
25649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25650        let mut __tmp = BytesMut::new(bytes);
25651        #[allow(clippy::absurd_extreme_comparisons)]
25652        #[allow(unused_comparisons)]
25653        if __tmp.remaining() < Self::ENCODED_LEN {
25654            panic!(
25655                "buffer is too small (need {} bytes, but got {})",
25656                Self::ENCODED_LEN,
25657                __tmp.remaining(),
25658            )
25659        }
25660        __tmp.put_f32_le(self.frequency);
25661        __tmp.put_u8(self.index);
25662        if matches!(version, MavlinkVersion::V2) {
25663            let len = __tmp.len();
25664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25665        } else {
25666            __tmp.len()
25667        }
25668    }
25669}
25670#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25671#[doc = ""]
25672#[doc = "ID: 65"]
25673#[derive(Debug, Clone, PartialEq)]
25674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25676#[cfg_attr(feature = "ts", derive(TS))]
25677#[cfg_attr(feature = "ts", ts(export))]
25678pub struct RC_CHANNELS_DATA {
25679    #[doc = "Timestamp (time since system boot)."]
25680    pub time_boot_ms: u32,
25681    #[doc = "RC channel 1 value."]
25682    pub chan1_raw: u16,
25683    #[doc = "RC channel 2 value."]
25684    pub chan2_raw: u16,
25685    #[doc = "RC channel 3 value."]
25686    pub chan3_raw: u16,
25687    #[doc = "RC channel 4 value."]
25688    pub chan4_raw: u16,
25689    #[doc = "RC channel 5 value."]
25690    pub chan5_raw: u16,
25691    #[doc = "RC channel 6 value."]
25692    pub chan6_raw: u16,
25693    #[doc = "RC channel 7 value."]
25694    pub chan7_raw: u16,
25695    #[doc = "RC channel 8 value."]
25696    pub chan8_raw: u16,
25697    #[doc = "RC channel 9 value."]
25698    pub chan9_raw: u16,
25699    #[doc = "RC channel 10 value."]
25700    pub chan10_raw: u16,
25701    #[doc = "RC channel 11 value."]
25702    pub chan11_raw: u16,
25703    #[doc = "RC channel 12 value."]
25704    pub chan12_raw: u16,
25705    #[doc = "RC channel 13 value."]
25706    pub chan13_raw: u16,
25707    #[doc = "RC channel 14 value."]
25708    pub chan14_raw: u16,
25709    #[doc = "RC channel 15 value."]
25710    pub chan15_raw: u16,
25711    #[doc = "RC channel 16 value."]
25712    pub chan16_raw: u16,
25713    #[doc = "RC channel 17 value."]
25714    pub chan17_raw: u16,
25715    #[doc = "RC channel 18 value."]
25716    pub chan18_raw: u16,
25717    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25718    pub chancount: u8,
25719    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25720    pub rssi: u8,
25721}
25722impl RC_CHANNELS_DATA {
25723    pub const ENCODED_LEN: usize = 42usize;
25724    pub const DEFAULT: Self = Self {
25725        time_boot_ms: 0_u32,
25726        chan1_raw: 0_u16,
25727        chan2_raw: 0_u16,
25728        chan3_raw: 0_u16,
25729        chan4_raw: 0_u16,
25730        chan5_raw: 0_u16,
25731        chan6_raw: 0_u16,
25732        chan7_raw: 0_u16,
25733        chan8_raw: 0_u16,
25734        chan9_raw: 0_u16,
25735        chan10_raw: 0_u16,
25736        chan11_raw: 0_u16,
25737        chan12_raw: 0_u16,
25738        chan13_raw: 0_u16,
25739        chan14_raw: 0_u16,
25740        chan15_raw: 0_u16,
25741        chan16_raw: 0_u16,
25742        chan17_raw: 0_u16,
25743        chan18_raw: 0_u16,
25744        chancount: 0_u8,
25745        rssi: 0_u8,
25746    };
25747    #[cfg(feature = "arbitrary")]
25748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25749        use arbitrary::{Arbitrary, Unstructured};
25750        let mut buf = [0u8; 1024];
25751        rng.fill_bytes(&mut buf);
25752        let mut unstructured = Unstructured::new(&buf);
25753        Self::arbitrary(&mut unstructured).unwrap_or_default()
25754    }
25755}
25756impl Default for RC_CHANNELS_DATA {
25757    fn default() -> Self {
25758        Self::DEFAULT.clone()
25759    }
25760}
25761impl MessageData for RC_CHANNELS_DATA {
25762    type Message = MavMessage;
25763    const ID: u32 = 65u32;
25764    const NAME: &'static str = "RC_CHANNELS";
25765    const EXTRA_CRC: u8 = 118u8;
25766    const ENCODED_LEN: usize = 42usize;
25767    fn deser(
25768        _version: MavlinkVersion,
25769        __input: &[u8],
25770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25771        let avail_len = __input.len();
25772        let mut payload_buf = [0; Self::ENCODED_LEN];
25773        let mut buf = if avail_len < Self::ENCODED_LEN {
25774            payload_buf[0..avail_len].copy_from_slice(__input);
25775            Bytes::new(&payload_buf)
25776        } else {
25777            Bytes::new(__input)
25778        };
25779        let mut __struct = Self::default();
25780        __struct.time_boot_ms = buf.get_u32_le();
25781        __struct.chan1_raw = buf.get_u16_le();
25782        __struct.chan2_raw = buf.get_u16_le();
25783        __struct.chan3_raw = buf.get_u16_le();
25784        __struct.chan4_raw = buf.get_u16_le();
25785        __struct.chan5_raw = buf.get_u16_le();
25786        __struct.chan6_raw = buf.get_u16_le();
25787        __struct.chan7_raw = buf.get_u16_le();
25788        __struct.chan8_raw = buf.get_u16_le();
25789        __struct.chan9_raw = buf.get_u16_le();
25790        __struct.chan10_raw = buf.get_u16_le();
25791        __struct.chan11_raw = buf.get_u16_le();
25792        __struct.chan12_raw = buf.get_u16_le();
25793        __struct.chan13_raw = buf.get_u16_le();
25794        __struct.chan14_raw = buf.get_u16_le();
25795        __struct.chan15_raw = buf.get_u16_le();
25796        __struct.chan16_raw = buf.get_u16_le();
25797        __struct.chan17_raw = buf.get_u16_le();
25798        __struct.chan18_raw = buf.get_u16_le();
25799        __struct.chancount = buf.get_u8();
25800        __struct.rssi = buf.get_u8();
25801        Ok(__struct)
25802    }
25803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25804        let mut __tmp = BytesMut::new(bytes);
25805        #[allow(clippy::absurd_extreme_comparisons)]
25806        #[allow(unused_comparisons)]
25807        if __tmp.remaining() < Self::ENCODED_LEN {
25808            panic!(
25809                "buffer is too small (need {} bytes, but got {})",
25810                Self::ENCODED_LEN,
25811                __tmp.remaining(),
25812            )
25813        }
25814        __tmp.put_u32_le(self.time_boot_ms);
25815        __tmp.put_u16_le(self.chan1_raw);
25816        __tmp.put_u16_le(self.chan2_raw);
25817        __tmp.put_u16_le(self.chan3_raw);
25818        __tmp.put_u16_le(self.chan4_raw);
25819        __tmp.put_u16_le(self.chan5_raw);
25820        __tmp.put_u16_le(self.chan6_raw);
25821        __tmp.put_u16_le(self.chan7_raw);
25822        __tmp.put_u16_le(self.chan8_raw);
25823        __tmp.put_u16_le(self.chan9_raw);
25824        __tmp.put_u16_le(self.chan10_raw);
25825        __tmp.put_u16_le(self.chan11_raw);
25826        __tmp.put_u16_le(self.chan12_raw);
25827        __tmp.put_u16_le(self.chan13_raw);
25828        __tmp.put_u16_le(self.chan14_raw);
25829        __tmp.put_u16_le(self.chan15_raw);
25830        __tmp.put_u16_le(self.chan16_raw);
25831        __tmp.put_u16_le(self.chan17_raw);
25832        __tmp.put_u16_le(self.chan18_raw);
25833        __tmp.put_u8(self.chancount);
25834        __tmp.put_u8(self.rssi);
25835        if matches!(version, MavlinkVersion::V2) {
25836            let len = __tmp.len();
25837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25838        } else {
25839            __tmp.len()
25840        }
25841    }
25842}
25843#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25844#[doc = ""]
25845#[doc = "ID: 70"]
25846#[derive(Debug, Clone, PartialEq)]
25847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25849#[cfg_attr(feature = "ts", derive(TS))]
25850#[cfg_attr(feature = "ts", ts(export))]
25851pub struct RC_CHANNELS_OVERRIDE_DATA {
25852    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25853    pub chan1_raw: u16,
25854    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25855    pub chan2_raw: u16,
25856    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25857    pub chan3_raw: u16,
25858    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25859    pub chan4_raw: u16,
25860    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25861    pub chan5_raw: u16,
25862    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25863    pub chan6_raw: u16,
25864    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25865    pub chan7_raw: u16,
25866    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25867    pub chan8_raw: u16,
25868    #[doc = "System ID"]
25869    pub target_system: u8,
25870    #[doc = "Component ID"]
25871    pub target_component: u8,
25872    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25873    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25874    pub chan9_raw: u16,
25875    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25876    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25877    pub chan10_raw: u16,
25878    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25880    pub chan11_raw: u16,
25881    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25883    pub chan12_raw: u16,
25884    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25885    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25886    pub chan13_raw: u16,
25887    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25889    pub chan14_raw: u16,
25890    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25892    pub chan15_raw: u16,
25893    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25894    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25895    pub chan16_raw: u16,
25896    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25897    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25898    pub chan17_raw: u16,
25899    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25900    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25901    pub chan18_raw: u16,
25902}
25903impl RC_CHANNELS_OVERRIDE_DATA {
25904    pub const ENCODED_LEN: usize = 38usize;
25905    pub const DEFAULT: Self = Self {
25906        chan1_raw: 0_u16,
25907        chan2_raw: 0_u16,
25908        chan3_raw: 0_u16,
25909        chan4_raw: 0_u16,
25910        chan5_raw: 0_u16,
25911        chan6_raw: 0_u16,
25912        chan7_raw: 0_u16,
25913        chan8_raw: 0_u16,
25914        target_system: 0_u8,
25915        target_component: 0_u8,
25916        chan9_raw: 0_u16,
25917        chan10_raw: 0_u16,
25918        chan11_raw: 0_u16,
25919        chan12_raw: 0_u16,
25920        chan13_raw: 0_u16,
25921        chan14_raw: 0_u16,
25922        chan15_raw: 0_u16,
25923        chan16_raw: 0_u16,
25924        chan17_raw: 0_u16,
25925        chan18_raw: 0_u16,
25926    };
25927    #[cfg(feature = "arbitrary")]
25928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25929        use arbitrary::{Arbitrary, Unstructured};
25930        let mut buf = [0u8; 1024];
25931        rng.fill_bytes(&mut buf);
25932        let mut unstructured = Unstructured::new(&buf);
25933        Self::arbitrary(&mut unstructured).unwrap_or_default()
25934    }
25935}
25936impl Default for RC_CHANNELS_OVERRIDE_DATA {
25937    fn default() -> Self {
25938        Self::DEFAULT.clone()
25939    }
25940}
25941impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25942    type Message = MavMessage;
25943    const ID: u32 = 70u32;
25944    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25945    const EXTRA_CRC: u8 = 124u8;
25946    const ENCODED_LEN: usize = 38usize;
25947    fn deser(
25948        _version: MavlinkVersion,
25949        __input: &[u8],
25950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25951        let avail_len = __input.len();
25952        let mut payload_buf = [0; Self::ENCODED_LEN];
25953        let mut buf = if avail_len < Self::ENCODED_LEN {
25954            payload_buf[0..avail_len].copy_from_slice(__input);
25955            Bytes::new(&payload_buf)
25956        } else {
25957            Bytes::new(__input)
25958        };
25959        let mut __struct = Self::default();
25960        __struct.chan1_raw = buf.get_u16_le();
25961        __struct.chan2_raw = buf.get_u16_le();
25962        __struct.chan3_raw = buf.get_u16_le();
25963        __struct.chan4_raw = buf.get_u16_le();
25964        __struct.chan5_raw = buf.get_u16_le();
25965        __struct.chan6_raw = buf.get_u16_le();
25966        __struct.chan7_raw = buf.get_u16_le();
25967        __struct.chan8_raw = buf.get_u16_le();
25968        __struct.target_system = buf.get_u8();
25969        __struct.target_component = buf.get_u8();
25970        __struct.chan9_raw = buf.get_u16_le();
25971        __struct.chan10_raw = buf.get_u16_le();
25972        __struct.chan11_raw = buf.get_u16_le();
25973        __struct.chan12_raw = buf.get_u16_le();
25974        __struct.chan13_raw = buf.get_u16_le();
25975        __struct.chan14_raw = buf.get_u16_le();
25976        __struct.chan15_raw = buf.get_u16_le();
25977        __struct.chan16_raw = buf.get_u16_le();
25978        __struct.chan17_raw = buf.get_u16_le();
25979        __struct.chan18_raw = buf.get_u16_le();
25980        Ok(__struct)
25981    }
25982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25983        let mut __tmp = BytesMut::new(bytes);
25984        #[allow(clippy::absurd_extreme_comparisons)]
25985        #[allow(unused_comparisons)]
25986        if __tmp.remaining() < Self::ENCODED_LEN {
25987            panic!(
25988                "buffer is too small (need {} bytes, but got {})",
25989                Self::ENCODED_LEN,
25990                __tmp.remaining(),
25991            )
25992        }
25993        __tmp.put_u16_le(self.chan1_raw);
25994        __tmp.put_u16_le(self.chan2_raw);
25995        __tmp.put_u16_le(self.chan3_raw);
25996        __tmp.put_u16_le(self.chan4_raw);
25997        __tmp.put_u16_le(self.chan5_raw);
25998        __tmp.put_u16_le(self.chan6_raw);
25999        __tmp.put_u16_le(self.chan7_raw);
26000        __tmp.put_u16_le(self.chan8_raw);
26001        __tmp.put_u8(self.target_system);
26002        __tmp.put_u8(self.target_component);
26003        if matches!(version, MavlinkVersion::V2) {
26004            __tmp.put_u16_le(self.chan9_raw);
26005            __tmp.put_u16_le(self.chan10_raw);
26006            __tmp.put_u16_le(self.chan11_raw);
26007            __tmp.put_u16_le(self.chan12_raw);
26008            __tmp.put_u16_le(self.chan13_raw);
26009            __tmp.put_u16_le(self.chan14_raw);
26010            __tmp.put_u16_le(self.chan15_raw);
26011            __tmp.put_u16_le(self.chan16_raw);
26012            __tmp.put_u16_le(self.chan17_raw);
26013            __tmp.put_u16_le(self.chan18_raw);
26014            let len = __tmp.len();
26015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26016        } else {
26017            __tmp.len()
26018        }
26019    }
26020}
26021#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26022#[doc = ""]
26023#[doc = "ID: 35"]
26024#[derive(Debug, Clone, PartialEq)]
26025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26027#[cfg_attr(feature = "ts", derive(TS))]
26028#[cfg_attr(feature = "ts", ts(export))]
26029pub struct RC_CHANNELS_RAW_DATA {
26030    #[doc = "Timestamp (time since system boot)."]
26031    pub time_boot_ms: u32,
26032    #[doc = "RC channel 1 value."]
26033    pub chan1_raw: u16,
26034    #[doc = "RC channel 2 value."]
26035    pub chan2_raw: u16,
26036    #[doc = "RC channel 3 value."]
26037    pub chan3_raw: u16,
26038    #[doc = "RC channel 4 value."]
26039    pub chan4_raw: u16,
26040    #[doc = "RC channel 5 value."]
26041    pub chan5_raw: u16,
26042    #[doc = "RC channel 6 value."]
26043    pub chan6_raw: u16,
26044    #[doc = "RC channel 7 value."]
26045    pub chan7_raw: u16,
26046    #[doc = "RC channel 8 value."]
26047    pub chan8_raw: u16,
26048    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26049    pub port: u8,
26050    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26051    pub rssi: u8,
26052}
26053impl RC_CHANNELS_RAW_DATA {
26054    pub const ENCODED_LEN: usize = 22usize;
26055    pub const DEFAULT: Self = Self {
26056        time_boot_ms: 0_u32,
26057        chan1_raw: 0_u16,
26058        chan2_raw: 0_u16,
26059        chan3_raw: 0_u16,
26060        chan4_raw: 0_u16,
26061        chan5_raw: 0_u16,
26062        chan6_raw: 0_u16,
26063        chan7_raw: 0_u16,
26064        chan8_raw: 0_u16,
26065        port: 0_u8,
26066        rssi: 0_u8,
26067    };
26068    #[cfg(feature = "arbitrary")]
26069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26070        use arbitrary::{Arbitrary, Unstructured};
26071        let mut buf = [0u8; 1024];
26072        rng.fill_bytes(&mut buf);
26073        let mut unstructured = Unstructured::new(&buf);
26074        Self::arbitrary(&mut unstructured).unwrap_or_default()
26075    }
26076}
26077impl Default for RC_CHANNELS_RAW_DATA {
26078    fn default() -> Self {
26079        Self::DEFAULT.clone()
26080    }
26081}
26082impl MessageData for RC_CHANNELS_RAW_DATA {
26083    type Message = MavMessage;
26084    const ID: u32 = 35u32;
26085    const NAME: &'static str = "RC_CHANNELS_RAW";
26086    const EXTRA_CRC: u8 = 244u8;
26087    const ENCODED_LEN: usize = 22usize;
26088    fn deser(
26089        _version: MavlinkVersion,
26090        __input: &[u8],
26091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26092        let avail_len = __input.len();
26093        let mut payload_buf = [0; Self::ENCODED_LEN];
26094        let mut buf = if avail_len < Self::ENCODED_LEN {
26095            payload_buf[0..avail_len].copy_from_slice(__input);
26096            Bytes::new(&payload_buf)
26097        } else {
26098            Bytes::new(__input)
26099        };
26100        let mut __struct = Self::default();
26101        __struct.time_boot_ms = buf.get_u32_le();
26102        __struct.chan1_raw = buf.get_u16_le();
26103        __struct.chan2_raw = buf.get_u16_le();
26104        __struct.chan3_raw = buf.get_u16_le();
26105        __struct.chan4_raw = buf.get_u16_le();
26106        __struct.chan5_raw = buf.get_u16_le();
26107        __struct.chan6_raw = buf.get_u16_le();
26108        __struct.chan7_raw = buf.get_u16_le();
26109        __struct.chan8_raw = buf.get_u16_le();
26110        __struct.port = buf.get_u8();
26111        __struct.rssi = buf.get_u8();
26112        Ok(__struct)
26113    }
26114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26115        let mut __tmp = BytesMut::new(bytes);
26116        #[allow(clippy::absurd_extreme_comparisons)]
26117        #[allow(unused_comparisons)]
26118        if __tmp.remaining() < Self::ENCODED_LEN {
26119            panic!(
26120                "buffer is too small (need {} bytes, but got {})",
26121                Self::ENCODED_LEN,
26122                __tmp.remaining(),
26123            )
26124        }
26125        __tmp.put_u32_le(self.time_boot_ms);
26126        __tmp.put_u16_le(self.chan1_raw);
26127        __tmp.put_u16_le(self.chan2_raw);
26128        __tmp.put_u16_le(self.chan3_raw);
26129        __tmp.put_u16_le(self.chan4_raw);
26130        __tmp.put_u16_le(self.chan5_raw);
26131        __tmp.put_u16_le(self.chan6_raw);
26132        __tmp.put_u16_le(self.chan7_raw);
26133        __tmp.put_u16_le(self.chan8_raw);
26134        __tmp.put_u8(self.port);
26135        __tmp.put_u8(self.rssi);
26136        if matches!(version, MavlinkVersion::V2) {
26137            let len = __tmp.len();
26138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26139        } else {
26140            __tmp.len()
26141        }
26142    }
26143}
26144#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26145#[doc = ""]
26146#[doc = "ID: 34"]
26147#[derive(Debug, Clone, PartialEq)]
26148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26150#[cfg_attr(feature = "ts", derive(TS))]
26151#[cfg_attr(feature = "ts", ts(export))]
26152pub struct RC_CHANNELS_SCALED_DATA {
26153    #[doc = "Timestamp (time since system boot)."]
26154    pub time_boot_ms: u32,
26155    #[doc = "RC channel 1 value scaled."]
26156    pub chan1_scaled: i16,
26157    #[doc = "RC channel 2 value scaled."]
26158    pub chan2_scaled: i16,
26159    #[doc = "RC channel 3 value scaled."]
26160    pub chan3_scaled: i16,
26161    #[doc = "RC channel 4 value scaled."]
26162    pub chan4_scaled: i16,
26163    #[doc = "RC channel 5 value scaled."]
26164    pub chan5_scaled: i16,
26165    #[doc = "RC channel 6 value scaled."]
26166    pub chan6_scaled: i16,
26167    #[doc = "RC channel 7 value scaled."]
26168    pub chan7_scaled: i16,
26169    #[doc = "RC channel 8 value scaled."]
26170    pub chan8_scaled: i16,
26171    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26172    pub port: u8,
26173    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26174    pub rssi: u8,
26175}
26176impl RC_CHANNELS_SCALED_DATA {
26177    pub const ENCODED_LEN: usize = 22usize;
26178    pub const DEFAULT: Self = Self {
26179        time_boot_ms: 0_u32,
26180        chan1_scaled: 0_i16,
26181        chan2_scaled: 0_i16,
26182        chan3_scaled: 0_i16,
26183        chan4_scaled: 0_i16,
26184        chan5_scaled: 0_i16,
26185        chan6_scaled: 0_i16,
26186        chan7_scaled: 0_i16,
26187        chan8_scaled: 0_i16,
26188        port: 0_u8,
26189        rssi: 0_u8,
26190    };
26191    #[cfg(feature = "arbitrary")]
26192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26193        use arbitrary::{Arbitrary, Unstructured};
26194        let mut buf = [0u8; 1024];
26195        rng.fill_bytes(&mut buf);
26196        let mut unstructured = Unstructured::new(&buf);
26197        Self::arbitrary(&mut unstructured).unwrap_or_default()
26198    }
26199}
26200impl Default for RC_CHANNELS_SCALED_DATA {
26201    fn default() -> Self {
26202        Self::DEFAULT.clone()
26203    }
26204}
26205impl MessageData for RC_CHANNELS_SCALED_DATA {
26206    type Message = MavMessage;
26207    const ID: u32 = 34u32;
26208    const NAME: &'static str = "RC_CHANNELS_SCALED";
26209    const EXTRA_CRC: u8 = 237u8;
26210    const ENCODED_LEN: usize = 22usize;
26211    fn deser(
26212        _version: MavlinkVersion,
26213        __input: &[u8],
26214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26215        let avail_len = __input.len();
26216        let mut payload_buf = [0; Self::ENCODED_LEN];
26217        let mut buf = if avail_len < Self::ENCODED_LEN {
26218            payload_buf[0..avail_len].copy_from_slice(__input);
26219            Bytes::new(&payload_buf)
26220        } else {
26221            Bytes::new(__input)
26222        };
26223        let mut __struct = Self::default();
26224        __struct.time_boot_ms = buf.get_u32_le();
26225        __struct.chan1_scaled = buf.get_i16_le();
26226        __struct.chan2_scaled = buf.get_i16_le();
26227        __struct.chan3_scaled = buf.get_i16_le();
26228        __struct.chan4_scaled = buf.get_i16_le();
26229        __struct.chan5_scaled = buf.get_i16_le();
26230        __struct.chan6_scaled = buf.get_i16_le();
26231        __struct.chan7_scaled = buf.get_i16_le();
26232        __struct.chan8_scaled = buf.get_i16_le();
26233        __struct.port = buf.get_u8();
26234        __struct.rssi = buf.get_u8();
26235        Ok(__struct)
26236    }
26237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26238        let mut __tmp = BytesMut::new(bytes);
26239        #[allow(clippy::absurd_extreme_comparisons)]
26240        #[allow(unused_comparisons)]
26241        if __tmp.remaining() < Self::ENCODED_LEN {
26242            panic!(
26243                "buffer is too small (need {} bytes, but got {})",
26244                Self::ENCODED_LEN,
26245                __tmp.remaining(),
26246            )
26247        }
26248        __tmp.put_u32_le(self.time_boot_ms);
26249        __tmp.put_i16_le(self.chan1_scaled);
26250        __tmp.put_i16_le(self.chan2_scaled);
26251        __tmp.put_i16_le(self.chan3_scaled);
26252        __tmp.put_i16_le(self.chan4_scaled);
26253        __tmp.put_i16_le(self.chan5_scaled);
26254        __tmp.put_i16_le(self.chan6_scaled);
26255        __tmp.put_i16_le(self.chan7_scaled);
26256        __tmp.put_i16_le(self.chan8_scaled);
26257        __tmp.put_u8(self.port);
26258        __tmp.put_u8(self.rssi);
26259        if matches!(version, MavlinkVersion::V2) {
26260            let len = __tmp.len();
26261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26262        } else {
26263            __tmp.len()
26264        }
26265    }
26266}
26267#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26268#[doc = "Request a data stream."]
26269#[doc = ""]
26270#[doc = "ID: 66"]
26271#[derive(Debug, Clone, PartialEq)]
26272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26274#[cfg_attr(feature = "ts", derive(TS))]
26275#[cfg_attr(feature = "ts", ts(export))]
26276pub struct REQUEST_DATA_STREAM_DATA {
26277    #[doc = "The requested message rate"]
26278    pub req_message_rate: u16,
26279    #[doc = "The target requested to send the message stream."]
26280    pub target_system: u8,
26281    #[doc = "The target requested to send the message stream."]
26282    pub target_component: u8,
26283    #[doc = "The ID of the requested data stream"]
26284    pub req_stream_id: u8,
26285    #[doc = "1 to start sending, 0 to stop sending."]
26286    pub start_stop: u8,
26287}
26288impl REQUEST_DATA_STREAM_DATA {
26289    pub const ENCODED_LEN: usize = 6usize;
26290    pub const DEFAULT: Self = Self {
26291        req_message_rate: 0_u16,
26292        target_system: 0_u8,
26293        target_component: 0_u8,
26294        req_stream_id: 0_u8,
26295        start_stop: 0_u8,
26296    };
26297    #[cfg(feature = "arbitrary")]
26298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26299        use arbitrary::{Arbitrary, Unstructured};
26300        let mut buf = [0u8; 1024];
26301        rng.fill_bytes(&mut buf);
26302        let mut unstructured = Unstructured::new(&buf);
26303        Self::arbitrary(&mut unstructured).unwrap_or_default()
26304    }
26305}
26306impl Default for REQUEST_DATA_STREAM_DATA {
26307    fn default() -> Self {
26308        Self::DEFAULT.clone()
26309    }
26310}
26311impl MessageData for REQUEST_DATA_STREAM_DATA {
26312    type Message = MavMessage;
26313    const ID: u32 = 66u32;
26314    const NAME: &'static str = "REQUEST_DATA_STREAM";
26315    const EXTRA_CRC: u8 = 148u8;
26316    const ENCODED_LEN: usize = 6usize;
26317    fn deser(
26318        _version: MavlinkVersion,
26319        __input: &[u8],
26320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26321        let avail_len = __input.len();
26322        let mut payload_buf = [0; Self::ENCODED_LEN];
26323        let mut buf = if avail_len < Self::ENCODED_LEN {
26324            payload_buf[0..avail_len].copy_from_slice(__input);
26325            Bytes::new(&payload_buf)
26326        } else {
26327            Bytes::new(__input)
26328        };
26329        let mut __struct = Self::default();
26330        __struct.req_message_rate = buf.get_u16_le();
26331        __struct.target_system = buf.get_u8();
26332        __struct.target_component = buf.get_u8();
26333        __struct.req_stream_id = buf.get_u8();
26334        __struct.start_stop = buf.get_u8();
26335        Ok(__struct)
26336    }
26337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26338        let mut __tmp = BytesMut::new(bytes);
26339        #[allow(clippy::absurd_extreme_comparisons)]
26340        #[allow(unused_comparisons)]
26341        if __tmp.remaining() < Self::ENCODED_LEN {
26342            panic!(
26343                "buffer is too small (need {} bytes, but got {})",
26344                Self::ENCODED_LEN,
26345                __tmp.remaining(),
26346            )
26347        }
26348        __tmp.put_u16_le(self.req_message_rate);
26349        __tmp.put_u8(self.target_system);
26350        __tmp.put_u8(self.target_component);
26351        __tmp.put_u8(self.req_stream_id);
26352        __tmp.put_u8(self.start_stop);
26353        if matches!(version, MavlinkVersion::V2) {
26354            let len = __tmp.len();
26355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26356        } else {
26357            __tmp.len()
26358        }
26359    }
26360}
26361#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26362#[doc = ""]
26363#[doc = "ID: 412"]
26364#[derive(Debug, Clone, PartialEq)]
26365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26367#[cfg_attr(feature = "ts", derive(TS))]
26368#[cfg_attr(feature = "ts", ts(export))]
26369pub struct REQUEST_EVENT_DATA {
26370    #[doc = "First sequence number of the requested event."]
26371    pub first_sequence: u16,
26372    #[doc = "Last sequence number of the requested event."]
26373    pub last_sequence: u16,
26374    #[doc = "System ID"]
26375    pub target_system: u8,
26376    #[doc = "Component ID"]
26377    pub target_component: u8,
26378}
26379impl REQUEST_EVENT_DATA {
26380    pub const ENCODED_LEN: usize = 6usize;
26381    pub const DEFAULT: Self = Self {
26382        first_sequence: 0_u16,
26383        last_sequence: 0_u16,
26384        target_system: 0_u8,
26385        target_component: 0_u8,
26386    };
26387    #[cfg(feature = "arbitrary")]
26388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26389        use arbitrary::{Arbitrary, Unstructured};
26390        let mut buf = [0u8; 1024];
26391        rng.fill_bytes(&mut buf);
26392        let mut unstructured = Unstructured::new(&buf);
26393        Self::arbitrary(&mut unstructured).unwrap_or_default()
26394    }
26395}
26396impl Default for REQUEST_EVENT_DATA {
26397    fn default() -> Self {
26398        Self::DEFAULT.clone()
26399    }
26400}
26401impl MessageData for REQUEST_EVENT_DATA {
26402    type Message = MavMessage;
26403    const ID: u32 = 412u32;
26404    const NAME: &'static str = "REQUEST_EVENT";
26405    const EXTRA_CRC: u8 = 33u8;
26406    const ENCODED_LEN: usize = 6usize;
26407    fn deser(
26408        _version: MavlinkVersion,
26409        __input: &[u8],
26410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26411        let avail_len = __input.len();
26412        let mut payload_buf = [0; Self::ENCODED_LEN];
26413        let mut buf = if avail_len < Self::ENCODED_LEN {
26414            payload_buf[0..avail_len].copy_from_slice(__input);
26415            Bytes::new(&payload_buf)
26416        } else {
26417            Bytes::new(__input)
26418        };
26419        let mut __struct = Self::default();
26420        __struct.first_sequence = buf.get_u16_le();
26421        __struct.last_sequence = buf.get_u16_le();
26422        __struct.target_system = buf.get_u8();
26423        __struct.target_component = buf.get_u8();
26424        Ok(__struct)
26425    }
26426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26427        let mut __tmp = BytesMut::new(bytes);
26428        #[allow(clippy::absurd_extreme_comparisons)]
26429        #[allow(unused_comparisons)]
26430        if __tmp.remaining() < Self::ENCODED_LEN {
26431            panic!(
26432                "buffer is too small (need {} bytes, but got {})",
26433                Self::ENCODED_LEN,
26434                __tmp.remaining(),
26435            )
26436        }
26437        __tmp.put_u16_le(self.first_sequence);
26438        __tmp.put_u16_le(self.last_sequence);
26439        __tmp.put_u8(self.target_system);
26440        __tmp.put_u8(self.target_component);
26441        if matches!(version, MavlinkVersion::V2) {
26442            let len = __tmp.len();
26443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26444        } else {
26445            __tmp.len()
26446        }
26447    }
26448}
26449#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26450#[doc = ""]
26451#[doc = "ID: 142"]
26452#[derive(Debug, Clone, PartialEq)]
26453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26455#[cfg_attr(feature = "ts", derive(TS))]
26456#[cfg_attr(feature = "ts", ts(export))]
26457pub struct RESOURCE_REQUEST_DATA {
26458    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26459    pub request_id: u8,
26460    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26461    pub uri_type: u8,
26462    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26465    pub uri: [u8; 120],
26466    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26467    pub transfer_type: u8,
26468    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26471    pub storage: [u8; 120],
26472}
26473impl RESOURCE_REQUEST_DATA {
26474    pub const ENCODED_LEN: usize = 243usize;
26475    pub const DEFAULT: Self = Self {
26476        request_id: 0_u8,
26477        uri_type: 0_u8,
26478        uri: [0_u8; 120usize],
26479        transfer_type: 0_u8,
26480        storage: [0_u8; 120usize],
26481    };
26482    #[cfg(feature = "arbitrary")]
26483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26484        use arbitrary::{Arbitrary, Unstructured};
26485        let mut buf = [0u8; 1024];
26486        rng.fill_bytes(&mut buf);
26487        let mut unstructured = Unstructured::new(&buf);
26488        Self::arbitrary(&mut unstructured).unwrap_or_default()
26489    }
26490}
26491impl Default for RESOURCE_REQUEST_DATA {
26492    fn default() -> Self {
26493        Self::DEFAULT.clone()
26494    }
26495}
26496impl MessageData for RESOURCE_REQUEST_DATA {
26497    type Message = MavMessage;
26498    const ID: u32 = 142u32;
26499    const NAME: &'static str = "RESOURCE_REQUEST";
26500    const EXTRA_CRC: u8 = 72u8;
26501    const ENCODED_LEN: usize = 243usize;
26502    fn deser(
26503        _version: MavlinkVersion,
26504        __input: &[u8],
26505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26506        let avail_len = __input.len();
26507        let mut payload_buf = [0; Self::ENCODED_LEN];
26508        let mut buf = if avail_len < Self::ENCODED_LEN {
26509            payload_buf[0..avail_len].copy_from_slice(__input);
26510            Bytes::new(&payload_buf)
26511        } else {
26512            Bytes::new(__input)
26513        };
26514        let mut __struct = Self::default();
26515        __struct.request_id = buf.get_u8();
26516        __struct.uri_type = buf.get_u8();
26517        for v in &mut __struct.uri {
26518            let val = buf.get_u8();
26519            *v = val;
26520        }
26521        __struct.transfer_type = buf.get_u8();
26522        for v in &mut __struct.storage {
26523            let val = buf.get_u8();
26524            *v = val;
26525        }
26526        Ok(__struct)
26527    }
26528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26529        let mut __tmp = BytesMut::new(bytes);
26530        #[allow(clippy::absurd_extreme_comparisons)]
26531        #[allow(unused_comparisons)]
26532        if __tmp.remaining() < Self::ENCODED_LEN {
26533            panic!(
26534                "buffer is too small (need {} bytes, but got {})",
26535                Self::ENCODED_LEN,
26536                __tmp.remaining(),
26537            )
26538        }
26539        __tmp.put_u8(self.request_id);
26540        __tmp.put_u8(self.uri_type);
26541        for val in &self.uri {
26542            __tmp.put_u8(*val);
26543        }
26544        __tmp.put_u8(self.transfer_type);
26545        for val in &self.storage {
26546            __tmp.put_u8(*val);
26547        }
26548        if matches!(version, MavlinkVersion::V2) {
26549            let len = __tmp.len();
26550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26551        } else {
26552            __tmp.len()
26553        }
26554    }
26555}
26556#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26557#[doc = ""]
26558#[doc = "ID: 413"]
26559#[derive(Debug, Clone, PartialEq)]
26560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26562#[cfg_attr(feature = "ts", derive(TS))]
26563#[cfg_attr(feature = "ts", ts(export))]
26564pub struct RESPONSE_EVENT_ERROR_DATA {
26565    #[doc = "Sequence number."]
26566    pub sequence: u16,
26567    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26568    pub sequence_oldest_available: u16,
26569    #[doc = "System ID"]
26570    pub target_system: u8,
26571    #[doc = "Component ID"]
26572    pub target_component: u8,
26573    #[doc = "Error reason."]
26574    pub reason: MavEventErrorReason,
26575}
26576impl RESPONSE_EVENT_ERROR_DATA {
26577    pub const ENCODED_LEN: usize = 7usize;
26578    pub const DEFAULT: Self = Self {
26579        sequence: 0_u16,
26580        sequence_oldest_available: 0_u16,
26581        target_system: 0_u8,
26582        target_component: 0_u8,
26583        reason: MavEventErrorReason::DEFAULT,
26584    };
26585    #[cfg(feature = "arbitrary")]
26586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26587        use arbitrary::{Arbitrary, Unstructured};
26588        let mut buf = [0u8; 1024];
26589        rng.fill_bytes(&mut buf);
26590        let mut unstructured = Unstructured::new(&buf);
26591        Self::arbitrary(&mut unstructured).unwrap_or_default()
26592    }
26593}
26594impl Default for RESPONSE_EVENT_ERROR_DATA {
26595    fn default() -> Self {
26596        Self::DEFAULT.clone()
26597    }
26598}
26599impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26600    type Message = MavMessage;
26601    const ID: u32 = 413u32;
26602    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26603    const EXTRA_CRC: u8 = 77u8;
26604    const ENCODED_LEN: usize = 7usize;
26605    fn deser(
26606        _version: MavlinkVersion,
26607        __input: &[u8],
26608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26609        let avail_len = __input.len();
26610        let mut payload_buf = [0; Self::ENCODED_LEN];
26611        let mut buf = if avail_len < Self::ENCODED_LEN {
26612            payload_buf[0..avail_len].copy_from_slice(__input);
26613            Bytes::new(&payload_buf)
26614        } else {
26615            Bytes::new(__input)
26616        };
26617        let mut __struct = Self::default();
26618        __struct.sequence = buf.get_u16_le();
26619        __struct.sequence_oldest_available = buf.get_u16_le();
26620        __struct.target_system = buf.get_u8();
26621        __struct.target_component = buf.get_u8();
26622        let tmp = buf.get_u8();
26623        __struct.reason =
26624            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26625                enum_type: "MavEventErrorReason",
26626                value: tmp as u32,
26627            })?;
26628        Ok(__struct)
26629    }
26630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26631        let mut __tmp = BytesMut::new(bytes);
26632        #[allow(clippy::absurd_extreme_comparisons)]
26633        #[allow(unused_comparisons)]
26634        if __tmp.remaining() < Self::ENCODED_LEN {
26635            panic!(
26636                "buffer is too small (need {} bytes, but got {})",
26637                Self::ENCODED_LEN,
26638                __tmp.remaining(),
26639            )
26640        }
26641        __tmp.put_u16_le(self.sequence);
26642        __tmp.put_u16_le(self.sequence_oldest_available);
26643        __tmp.put_u8(self.target_system);
26644        __tmp.put_u8(self.target_component);
26645        __tmp.put_u8(self.reason as u8);
26646        if matches!(version, MavlinkVersion::V2) {
26647            let len = __tmp.len();
26648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26649        } else {
26650            __tmp.len()
26651        }
26652    }
26653}
26654#[doc = "Read out the safety zone the MAV currently assumes."]
26655#[doc = ""]
26656#[doc = "ID: 55"]
26657#[derive(Debug, Clone, PartialEq)]
26658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26660#[cfg_attr(feature = "ts", derive(TS))]
26661#[cfg_attr(feature = "ts", ts(export))]
26662pub struct SAFETY_ALLOWED_AREA_DATA {
26663    #[doc = "x position 1 / Latitude 1"]
26664    pub p1x: f32,
26665    #[doc = "y position 1 / Longitude 1"]
26666    pub p1y: f32,
26667    #[doc = "z position 1 / Altitude 1"]
26668    pub p1z: f32,
26669    #[doc = "x position 2 / Latitude 2"]
26670    pub p2x: f32,
26671    #[doc = "y position 2 / Longitude 2"]
26672    pub p2y: f32,
26673    #[doc = "z position 2 / Altitude 2"]
26674    pub p2z: f32,
26675    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26676    pub frame: MavFrame,
26677}
26678impl SAFETY_ALLOWED_AREA_DATA {
26679    pub const ENCODED_LEN: usize = 25usize;
26680    pub const DEFAULT: Self = Self {
26681        p1x: 0.0_f32,
26682        p1y: 0.0_f32,
26683        p1z: 0.0_f32,
26684        p2x: 0.0_f32,
26685        p2y: 0.0_f32,
26686        p2z: 0.0_f32,
26687        frame: MavFrame::DEFAULT,
26688    };
26689    #[cfg(feature = "arbitrary")]
26690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26691        use arbitrary::{Arbitrary, Unstructured};
26692        let mut buf = [0u8; 1024];
26693        rng.fill_bytes(&mut buf);
26694        let mut unstructured = Unstructured::new(&buf);
26695        Self::arbitrary(&mut unstructured).unwrap_or_default()
26696    }
26697}
26698impl Default for SAFETY_ALLOWED_AREA_DATA {
26699    fn default() -> Self {
26700        Self::DEFAULT.clone()
26701    }
26702}
26703impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26704    type Message = MavMessage;
26705    const ID: u32 = 55u32;
26706    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26707    const EXTRA_CRC: u8 = 3u8;
26708    const ENCODED_LEN: usize = 25usize;
26709    fn deser(
26710        _version: MavlinkVersion,
26711        __input: &[u8],
26712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26713        let avail_len = __input.len();
26714        let mut payload_buf = [0; Self::ENCODED_LEN];
26715        let mut buf = if avail_len < Self::ENCODED_LEN {
26716            payload_buf[0..avail_len].copy_from_slice(__input);
26717            Bytes::new(&payload_buf)
26718        } else {
26719            Bytes::new(__input)
26720        };
26721        let mut __struct = Self::default();
26722        __struct.p1x = buf.get_f32_le();
26723        __struct.p1y = buf.get_f32_le();
26724        __struct.p1z = buf.get_f32_le();
26725        __struct.p2x = buf.get_f32_le();
26726        __struct.p2y = buf.get_f32_le();
26727        __struct.p2z = buf.get_f32_le();
26728        let tmp = buf.get_u8();
26729        __struct.frame =
26730            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26731                enum_type: "MavFrame",
26732                value: tmp as u32,
26733            })?;
26734        Ok(__struct)
26735    }
26736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26737        let mut __tmp = BytesMut::new(bytes);
26738        #[allow(clippy::absurd_extreme_comparisons)]
26739        #[allow(unused_comparisons)]
26740        if __tmp.remaining() < Self::ENCODED_LEN {
26741            panic!(
26742                "buffer is too small (need {} bytes, but got {})",
26743                Self::ENCODED_LEN,
26744                __tmp.remaining(),
26745            )
26746        }
26747        __tmp.put_f32_le(self.p1x);
26748        __tmp.put_f32_le(self.p1y);
26749        __tmp.put_f32_le(self.p1z);
26750        __tmp.put_f32_le(self.p2x);
26751        __tmp.put_f32_le(self.p2y);
26752        __tmp.put_f32_le(self.p2z);
26753        __tmp.put_u8(self.frame as u8);
26754        if matches!(version, MavlinkVersion::V2) {
26755            let len = __tmp.len();
26756            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26757        } else {
26758            __tmp.len()
26759        }
26760    }
26761}
26762#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26763#[doc = ""]
26764#[doc = "ID: 54"]
26765#[derive(Debug, Clone, PartialEq)]
26766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26768#[cfg_attr(feature = "ts", derive(TS))]
26769#[cfg_attr(feature = "ts", ts(export))]
26770pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26771    #[doc = "x position 1 / Latitude 1"]
26772    pub p1x: f32,
26773    #[doc = "y position 1 / Longitude 1"]
26774    pub p1y: f32,
26775    #[doc = "z position 1 / Altitude 1"]
26776    pub p1z: f32,
26777    #[doc = "x position 2 / Latitude 2"]
26778    pub p2x: f32,
26779    #[doc = "y position 2 / Longitude 2"]
26780    pub p2y: f32,
26781    #[doc = "z position 2 / Altitude 2"]
26782    pub p2z: f32,
26783    #[doc = "System ID"]
26784    pub target_system: u8,
26785    #[doc = "Component ID"]
26786    pub target_component: u8,
26787    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26788    pub frame: MavFrame,
26789}
26790impl SAFETY_SET_ALLOWED_AREA_DATA {
26791    pub const ENCODED_LEN: usize = 27usize;
26792    pub const DEFAULT: Self = Self {
26793        p1x: 0.0_f32,
26794        p1y: 0.0_f32,
26795        p1z: 0.0_f32,
26796        p2x: 0.0_f32,
26797        p2y: 0.0_f32,
26798        p2z: 0.0_f32,
26799        target_system: 0_u8,
26800        target_component: 0_u8,
26801        frame: MavFrame::DEFAULT,
26802    };
26803    #[cfg(feature = "arbitrary")]
26804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26805        use arbitrary::{Arbitrary, Unstructured};
26806        let mut buf = [0u8; 1024];
26807        rng.fill_bytes(&mut buf);
26808        let mut unstructured = Unstructured::new(&buf);
26809        Self::arbitrary(&mut unstructured).unwrap_or_default()
26810    }
26811}
26812impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26813    fn default() -> Self {
26814        Self::DEFAULT.clone()
26815    }
26816}
26817impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26818    type Message = MavMessage;
26819    const ID: u32 = 54u32;
26820    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26821    const EXTRA_CRC: u8 = 15u8;
26822    const ENCODED_LEN: usize = 27usize;
26823    fn deser(
26824        _version: MavlinkVersion,
26825        __input: &[u8],
26826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26827        let avail_len = __input.len();
26828        let mut payload_buf = [0; Self::ENCODED_LEN];
26829        let mut buf = if avail_len < Self::ENCODED_LEN {
26830            payload_buf[0..avail_len].copy_from_slice(__input);
26831            Bytes::new(&payload_buf)
26832        } else {
26833            Bytes::new(__input)
26834        };
26835        let mut __struct = Self::default();
26836        __struct.p1x = buf.get_f32_le();
26837        __struct.p1y = buf.get_f32_le();
26838        __struct.p1z = buf.get_f32_le();
26839        __struct.p2x = buf.get_f32_le();
26840        __struct.p2y = buf.get_f32_le();
26841        __struct.p2z = buf.get_f32_le();
26842        __struct.target_system = buf.get_u8();
26843        __struct.target_component = buf.get_u8();
26844        let tmp = buf.get_u8();
26845        __struct.frame =
26846            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26847                enum_type: "MavFrame",
26848                value: tmp as u32,
26849            })?;
26850        Ok(__struct)
26851    }
26852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26853        let mut __tmp = BytesMut::new(bytes);
26854        #[allow(clippy::absurd_extreme_comparisons)]
26855        #[allow(unused_comparisons)]
26856        if __tmp.remaining() < Self::ENCODED_LEN {
26857            panic!(
26858                "buffer is too small (need {} bytes, but got {})",
26859                Self::ENCODED_LEN,
26860                __tmp.remaining(),
26861            )
26862        }
26863        __tmp.put_f32_le(self.p1x);
26864        __tmp.put_f32_le(self.p1y);
26865        __tmp.put_f32_le(self.p1z);
26866        __tmp.put_f32_le(self.p2x);
26867        __tmp.put_f32_le(self.p2y);
26868        __tmp.put_f32_le(self.p2z);
26869        __tmp.put_u8(self.target_system);
26870        __tmp.put_u8(self.target_component);
26871        __tmp.put_u8(self.frame as u8);
26872        if matches!(version, MavlinkVersion::V2) {
26873            let len = __tmp.len();
26874            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26875        } else {
26876            __tmp.len()
26877        }
26878    }
26879}
26880#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26881#[doc = ""]
26882#[doc = "ID: 26"]
26883#[derive(Debug, Clone, PartialEq)]
26884#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26885#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26886#[cfg_attr(feature = "ts", derive(TS))]
26887#[cfg_attr(feature = "ts", ts(export))]
26888pub struct SCALED_IMU_DATA {
26889    #[doc = "Timestamp (time since system boot)."]
26890    pub time_boot_ms: u32,
26891    #[doc = "X acceleration"]
26892    pub xacc: i16,
26893    #[doc = "Y acceleration"]
26894    pub yacc: i16,
26895    #[doc = "Z acceleration"]
26896    pub zacc: i16,
26897    #[doc = "Angular speed around X axis"]
26898    pub xgyro: i16,
26899    #[doc = "Angular speed around Y axis"]
26900    pub ygyro: i16,
26901    #[doc = "Angular speed around Z axis"]
26902    pub zgyro: i16,
26903    #[doc = "X Magnetic field"]
26904    pub xmag: i16,
26905    #[doc = "Y Magnetic field"]
26906    pub ymag: i16,
26907    #[doc = "Z Magnetic field"]
26908    pub zmag: i16,
26909    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26910    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26911    pub temperature: i16,
26912}
26913impl SCALED_IMU_DATA {
26914    pub const ENCODED_LEN: usize = 24usize;
26915    pub const DEFAULT: Self = Self {
26916        time_boot_ms: 0_u32,
26917        xacc: 0_i16,
26918        yacc: 0_i16,
26919        zacc: 0_i16,
26920        xgyro: 0_i16,
26921        ygyro: 0_i16,
26922        zgyro: 0_i16,
26923        xmag: 0_i16,
26924        ymag: 0_i16,
26925        zmag: 0_i16,
26926        temperature: 0_i16,
26927    };
26928    #[cfg(feature = "arbitrary")]
26929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26930        use arbitrary::{Arbitrary, Unstructured};
26931        let mut buf = [0u8; 1024];
26932        rng.fill_bytes(&mut buf);
26933        let mut unstructured = Unstructured::new(&buf);
26934        Self::arbitrary(&mut unstructured).unwrap_or_default()
26935    }
26936}
26937impl Default for SCALED_IMU_DATA {
26938    fn default() -> Self {
26939        Self::DEFAULT.clone()
26940    }
26941}
26942impl MessageData for SCALED_IMU_DATA {
26943    type Message = MavMessage;
26944    const ID: u32 = 26u32;
26945    const NAME: &'static str = "SCALED_IMU";
26946    const EXTRA_CRC: u8 = 170u8;
26947    const ENCODED_LEN: usize = 24usize;
26948    fn deser(
26949        _version: MavlinkVersion,
26950        __input: &[u8],
26951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26952        let avail_len = __input.len();
26953        let mut payload_buf = [0; Self::ENCODED_LEN];
26954        let mut buf = if avail_len < Self::ENCODED_LEN {
26955            payload_buf[0..avail_len].copy_from_slice(__input);
26956            Bytes::new(&payload_buf)
26957        } else {
26958            Bytes::new(__input)
26959        };
26960        let mut __struct = Self::default();
26961        __struct.time_boot_ms = buf.get_u32_le();
26962        __struct.xacc = buf.get_i16_le();
26963        __struct.yacc = buf.get_i16_le();
26964        __struct.zacc = buf.get_i16_le();
26965        __struct.xgyro = buf.get_i16_le();
26966        __struct.ygyro = buf.get_i16_le();
26967        __struct.zgyro = buf.get_i16_le();
26968        __struct.xmag = buf.get_i16_le();
26969        __struct.ymag = buf.get_i16_le();
26970        __struct.zmag = buf.get_i16_le();
26971        __struct.temperature = buf.get_i16_le();
26972        Ok(__struct)
26973    }
26974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26975        let mut __tmp = BytesMut::new(bytes);
26976        #[allow(clippy::absurd_extreme_comparisons)]
26977        #[allow(unused_comparisons)]
26978        if __tmp.remaining() < Self::ENCODED_LEN {
26979            panic!(
26980                "buffer is too small (need {} bytes, but got {})",
26981                Self::ENCODED_LEN,
26982                __tmp.remaining(),
26983            )
26984        }
26985        __tmp.put_u32_le(self.time_boot_ms);
26986        __tmp.put_i16_le(self.xacc);
26987        __tmp.put_i16_le(self.yacc);
26988        __tmp.put_i16_le(self.zacc);
26989        __tmp.put_i16_le(self.xgyro);
26990        __tmp.put_i16_le(self.ygyro);
26991        __tmp.put_i16_le(self.zgyro);
26992        __tmp.put_i16_le(self.xmag);
26993        __tmp.put_i16_le(self.ymag);
26994        __tmp.put_i16_le(self.zmag);
26995        if matches!(version, MavlinkVersion::V2) {
26996            __tmp.put_i16_le(self.temperature);
26997            let len = __tmp.len();
26998            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26999        } else {
27000            __tmp.len()
27001        }
27002    }
27003}
27004#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27005#[doc = ""]
27006#[doc = "ID: 116"]
27007#[derive(Debug, Clone, PartialEq)]
27008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27010#[cfg_attr(feature = "ts", derive(TS))]
27011#[cfg_attr(feature = "ts", ts(export))]
27012pub struct SCALED_IMU2_DATA {
27013    #[doc = "Timestamp (time since system boot)."]
27014    pub time_boot_ms: u32,
27015    #[doc = "X acceleration"]
27016    pub xacc: i16,
27017    #[doc = "Y acceleration"]
27018    pub yacc: i16,
27019    #[doc = "Z acceleration"]
27020    pub zacc: i16,
27021    #[doc = "Angular speed around X axis"]
27022    pub xgyro: i16,
27023    #[doc = "Angular speed around Y axis"]
27024    pub ygyro: i16,
27025    #[doc = "Angular speed around Z axis"]
27026    pub zgyro: i16,
27027    #[doc = "X Magnetic field"]
27028    pub xmag: i16,
27029    #[doc = "Y Magnetic field"]
27030    pub ymag: i16,
27031    #[doc = "Z Magnetic field"]
27032    pub zmag: i16,
27033    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27035    pub temperature: i16,
27036}
27037impl SCALED_IMU2_DATA {
27038    pub const ENCODED_LEN: usize = 24usize;
27039    pub const DEFAULT: Self = Self {
27040        time_boot_ms: 0_u32,
27041        xacc: 0_i16,
27042        yacc: 0_i16,
27043        zacc: 0_i16,
27044        xgyro: 0_i16,
27045        ygyro: 0_i16,
27046        zgyro: 0_i16,
27047        xmag: 0_i16,
27048        ymag: 0_i16,
27049        zmag: 0_i16,
27050        temperature: 0_i16,
27051    };
27052    #[cfg(feature = "arbitrary")]
27053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27054        use arbitrary::{Arbitrary, Unstructured};
27055        let mut buf = [0u8; 1024];
27056        rng.fill_bytes(&mut buf);
27057        let mut unstructured = Unstructured::new(&buf);
27058        Self::arbitrary(&mut unstructured).unwrap_or_default()
27059    }
27060}
27061impl Default for SCALED_IMU2_DATA {
27062    fn default() -> Self {
27063        Self::DEFAULT.clone()
27064    }
27065}
27066impl MessageData for SCALED_IMU2_DATA {
27067    type Message = MavMessage;
27068    const ID: u32 = 116u32;
27069    const NAME: &'static str = "SCALED_IMU2";
27070    const EXTRA_CRC: u8 = 76u8;
27071    const ENCODED_LEN: usize = 24usize;
27072    fn deser(
27073        _version: MavlinkVersion,
27074        __input: &[u8],
27075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27076        let avail_len = __input.len();
27077        let mut payload_buf = [0; Self::ENCODED_LEN];
27078        let mut buf = if avail_len < Self::ENCODED_LEN {
27079            payload_buf[0..avail_len].copy_from_slice(__input);
27080            Bytes::new(&payload_buf)
27081        } else {
27082            Bytes::new(__input)
27083        };
27084        let mut __struct = Self::default();
27085        __struct.time_boot_ms = buf.get_u32_le();
27086        __struct.xacc = buf.get_i16_le();
27087        __struct.yacc = buf.get_i16_le();
27088        __struct.zacc = buf.get_i16_le();
27089        __struct.xgyro = buf.get_i16_le();
27090        __struct.ygyro = buf.get_i16_le();
27091        __struct.zgyro = buf.get_i16_le();
27092        __struct.xmag = buf.get_i16_le();
27093        __struct.ymag = buf.get_i16_le();
27094        __struct.zmag = buf.get_i16_le();
27095        __struct.temperature = buf.get_i16_le();
27096        Ok(__struct)
27097    }
27098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27099        let mut __tmp = BytesMut::new(bytes);
27100        #[allow(clippy::absurd_extreme_comparisons)]
27101        #[allow(unused_comparisons)]
27102        if __tmp.remaining() < Self::ENCODED_LEN {
27103            panic!(
27104                "buffer is too small (need {} bytes, but got {})",
27105                Self::ENCODED_LEN,
27106                __tmp.remaining(),
27107            )
27108        }
27109        __tmp.put_u32_le(self.time_boot_ms);
27110        __tmp.put_i16_le(self.xacc);
27111        __tmp.put_i16_le(self.yacc);
27112        __tmp.put_i16_le(self.zacc);
27113        __tmp.put_i16_le(self.xgyro);
27114        __tmp.put_i16_le(self.ygyro);
27115        __tmp.put_i16_le(self.zgyro);
27116        __tmp.put_i16_le(self.xmag);
27117        __tmp.put_i16_le(self.ymag);
27118        __tmp.put_i16_le(self.zmag);
27119        if matches!(version, MavlinkVersion::V2) {
27120            __tmp.put_i16_le(self.temperature);
27121            let len = __tmp.len();
27122            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27123        } else {
27124            __tmp.len()
27125        }
27126    }
27127}
27128#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27129#[doc = ""]
27130#[doc = "ID: 129"]
27131#[derive(Debug, Clone, PartialEq)]
27132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27134#[cfg_attr(feature = "ts", derive(TS))]
27135#[cfg_attr(feature = "ts", ts(export))]
27136pub struct SCALED_IMU3_DATA {
27137    #[doc = "Timestamp (time since system boot)."]
27138    pub time_boot_ms: u32,
27139    #[doc = "X acceleration"]
27140    pub xacc: i16,
27141    #[doc = "Y acceleration"]
27142    pub yacc: i16,
27143    #[doc = "Z acceleration"]
27144    pub zacc: i16,
27145    #[doc = "Angular speed around X axis"]
27146    pub xgyro: i16,
27147    #[doc = "Angular speed around Y axis"]
27148    pub ygyro: i16,
27149    #[doc = "Angular speed around Z axis"]
27150    pub zgyro: i16,
27151    #[doc = "X Magnetic field"]
27152    pub xmag: i16,
27153    #[doc = "Y Magnetic field"]
27154    pub ymag: i16,
27155    #[doc = "Z Magnetic field"]
27156    pub zmag: i16,
27157    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27158    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27159    pub temperature: i16,
27160}
27161impl SCALED_IMU3_DATA {
27162    pub const ENCODED_LEN: usize = 24usize;
27163    pub const DEFAULT: Self = Self {
27164        time_boot_ms: 0_u32,
27165        xacc: 0_i16,
27166        yacc: 0_i16,
27167        zacc: 0_i16,
27168        xgyro: 0_i16,
27169        ygyro: 0_i16,
27170        zgyro: 0_i16,
27171        xmag: 0_i16,
27172        ymag: 0_i16,
27173        zmag: 0_i16,
27174        temperature: 0_i16,
27175    };
27176    #[cfg(feature = "arbitrary")]
27177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27178        use arbitrary::{Arbitrary, Unstructured};
27179        let mut buf = [0u8; 1024];
27180        rng.fill_bytes(&mut buf);
27181        let mut unstructured = Unstructured::new(&buf);
27182        Self::arbitrary(&mut unstructured).unwrap_or_default()
27183    }
27184}
27185impl Default for SCALED_IMU3_DATA {
27186    fn default() -> Self {
27187        Self::DEFAULT.clone()
27188    }
27189}
27190impl MessageData for SCALED_IMU3_DATA {
27191    type Message = MavMessage;
27192    const ID: u32 = 129u32;
27193    const NAME: &'static str = "SCALED_IMU3";
27194    const EXTRA_CRC: u8 = 46u8;
27195    const ENCODED_LEN: usize = 24usize;
27196    fn deser(
27197        _version: MavlinkVersion,
27198        __input: &[u8],
27199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27200        let avail_len = __input.len();
27201        let mut payload_buf = [0; Self::ENCODED_LEN];
27202        let mut buf = if avail_len < Self::ENCODED_LEN {
27203            payload_buf[0..avail_len].copy_from_slice(__input);
27204            Bytes::new(&payload_buf)
27205        } else {
27206            Bytes::new(__input)
27207        };
27208        let mut __struct = Self::default();
27209        __struct.time_boot_ms = buf.get_u32_le();
27210        __struct.xacc = buf.get_i16_le();
27211        __struct.yacc = buf.get_i16_le();
27212        __struct.zacc = buf.get_i16_le();
27213        __struct.xgyro = buf.get_i16_le();
27214        __struct.ygyro = buf.get_i16_le();
27215        __struct.zgyro = buf.get_i16_le();
27216        __struct.xmag = buf.get_i16_le();
27217        __struct.ymag = buf.get_i16_le();
27218        __struct.zmag = buf.get_i16_le();
27219        __struct.temperature = buf.get_i16_le();
27220        Ok(__struct)
27221    }
27222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27223        let mut __tmp = BytesMut::new(bytes);
27224        #[allow(clippy::absurd_extreme_comparisons)]
27225        #[allow(unused_comparisons)]
27226        if __tmp.remaining() < Self::ENCODED_LEN {
27227            panic!(
27228                "buffer is too small (need {} bytes, but got {})",
27229                Self::ENCODED_LEN,
27230                __tmp.remaining(),
27231            )
27232        }
27233        __tmp.put_u32_le(self.time_boot_ms);
27234        __tmp.put_i16_le(self.xacc);
27235        __tmp.put_i16_le(self.yacc);
27236        __tmp.put_i16_le(self.zacc);
27237        __tmp.put_i16_le(self.xgyro);
27238        __tmp.put_i16_le(self.ygyro);
27239        __tmp.put_i16_le(self.zgyro);
27240        __tmp.put_i16_le(self.xmag);
27241        __tmp.put_i16_le(self.ymag);
27242        __tmp.put_i16_le(self.zmag);
27243        if matches!(version, MavlinkVersion::V2) {
27244            __tmp.put_i16_le(self.temperature);
27245            let len = __tmp.len();
27246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27247        } else {
27248            __tmp.len()
27249        }
27250    }
27251}
27252#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27253#[doc = ""]
27254#[doc = "ID: 29"]
27255#[derive(Debug, Clone, PartialEq)]
27256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27258#[cfg_attr(feature = "ts", derive(TS))]
27259#[cfg_attr(feature = "ts", ts(export))]
27260pub struct SCALED_PRESSURE_DATA {
27261    #[doc = "Timestamp (time since system boot)."]
27262    pub time_boot_ms: u32,
27263    #[doc = "Absolute pressure"]
27264    pub press_abs: f32,
27265    #[doc = "Differential pressure 1"]
27266    pub press_diff: f32,
27267    #[doc = "Absolute pressure temperature"]
27268    pub temperature: i16,
27269    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27270    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27271    pub temperature_press_diff: i16,
27272}
27273impl SCALED_PRESSURE_DATA {
27274    pub const ENCODED_LEN: usize = 16usize;
27275    pub const DEFAULT: Self = Self {
27276        time_boot_ms: 0_u32,
27277        press_abs: 0.0_f32,
27278        press_diff: 0.0_f32,
27279        temperature: 0_i16,
27280        temperature_press_diff: 0_i16,
27281    };
27282    #[cfg(feature = "arbitrary")]
27283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27284        use arbitrary::{Arbitrary, Unstructured};
27285        let mut buf = [0u8; 1024];
27286        rng.fill_bytes(&mut buf);
27287        let mut unstructured = Unstructured::new(&buf);
27288        Self::arbitrary(&mut unstructured).unwrap_or_default()
27289    }
27290}
27291impl Default for SCALED_PRESSURE_DATA {
27292    fn default() -> Self {
27293        Self::DEFAULT.clone()
27294    }
27295}
27296impl MessageData for SCALED_PRESSURE_DATA {
27297    type Message = MavMessage;
27298    const ID: u32 = 29u32;
27299    const NAME: &'static str = "SCALED_PRESSURE";
27300    const EXTRA_CRC: u8 = 115u8;
27301    const ENCODED_LEN: usize = 16usize;
27302    fn deser(
27303        _version: MavlinkVersion,
27304        __input: &[u8],
27305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27306        let avail_len = __input.len();
27307        let mut payload_buf = [0; Self::ENCODED_LEN];
27308        let mut buf = if avail_len < Self::ENCODED_LEN {
27309            payload_buf[0..avail_len].copy_from_slice(__input);
27310            Bytes::new(&payload_buf)
27311        } else {
27312            Bytes::new(__input)
27313        };
27314        let mut __struct = Self::default();
27315        __struct.time_boot_ms = buf.get_u32_le();
27316        __struct.press_abs = buf.get_f32_le();
27317        __struct.press_diff = buf.get_f32_le();
27318        __struct.temperature = buf.get_i16_le();
27319        __struct.temperature_press_diff = buf.get_i16_le();
27320        Ok(__struct)
27321    }
27322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27323        let mut __tmp = BytesMut::new(bytes);
27324        #[allow(clippy::absurd_extreme_comparisons)]
27325        #[allow(unused_comparisons)]
27326        if __tmp.remaining() < Self::ENCODED_LEN {
27327            panic!(
27328                "buffer is too small (need {} bytes, but got {})",
27329                Self::ENCODED_LEN,
27330                __tmp.remaining(),
27331            )
27332        }
27333        __tmp.put_u32_le(self.time_boot_ms);
27334        __tmp.put_f32_le(self.press_abs);
27335        __tmp.put_f32_le(self.press_diff);
27336        __tmp.put_i16_le(self.temperature);
27337        if matches!(version, MavlinkVersion::V2) {
27338            __tmp.put_i16_le(self.temperature_press_diff);
27339            let len = __tmp.len();
27340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27341        } else {
27342            __tmp.len()
27343        }
27344    }
27345}
27346#[doc = "Barometer readings for 2nd barometer."]
27347#[doc = ""]
27348#[doc = "ID: 137"]
27349#[derive(Debug, Clone, PartialEq)]
27350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27352#[cfg_attr(feature = "ts", derive(TS))]
27353#[cfg_attr(feature = "ts", ts(export))]
27354pub struct SCALED_PRESSURE2_DATA {
27355    #[doc = "Timestamp (time since system boot)."]
27356    pub time_boot_ms: u32,
27357    #[doc = "Absolute pressure"]
27358    pub press_abs: f32,
27359    #[doc = "Differential pressure"]
27360    pub press_diff: f32,
27361    #[doc = "Absolute pressure temperature"]
27362    pub temperature: i16,
27363    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27365    pub temperature_press_diff: i16,
27366}
27367impl SCALED_PRESSURE2_DATA {
27368    pub const ENCODED_LEN: usize = 16usize;
27369    pub const DEFAULT: Self = Self {
27370        time_boot_ms: 0_u32,
27371        press_abs: 0.0_f32,
27372        press_diff: 0.0_f32,
27373        temperature: 0_i16,
27374        temperature_press_diff: 0_i16,
27375    };
27376    #[cfg(feature = "arbitrary")]
27377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27378        use arbitrary::{Arbitrary, Unstructured};
27379        let mut buf = [0u8; 1024];
27380        rng.fill_bytes(&mut buf);
27381        let mut unstructured = Unstructured::new(&buf);
27382        Self::arbitrary(&mut unstructured).unwrap_or_default()
27383    }
27384}
27385impl Default for SCALED_PRESSURE2_DATA {
27386    fn default() -> Self {
27387        Self::DEFAULT.clone()
27388    }
27389}
27390impl MessageData for SCALED_PRESSURE2_DATA {
27391    type Message = MavMessage;
27392    const ID: u32 = 137u32;
27393    const NAME: &'static str = "SCALED_PRESSURE2";
27394    const EXTRA_CRC: u8 = 195u8;
27395    const ENCODED_LEN: usize = 16usize;
27396    fn deser(
27397        _version: MavlinkVersion,
27398        __input: &[u8],
27399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27400        let avail_len = __input.len();
27401        let mut payload_buf = [0; Self::ENCODED_LEN];
27402        let mut buf = if avail_len < Self::ENCODED_LEN {
27403            payload_buf[0..avail_len].copy_from_slice(__input);
27404            Bytes::new(&payload_buf)
27405        } else {
27406            Bytes::new(__input)
27407        };
27408        let mut __struct = Self::default();
27409        __struct.time_boot_ms = buf.get_u32_le();
27410        __struct.press_abs = buf.get_f32_le();
27411        __struct.press_diff = buf.get_f32_le();
27412        __struct.temperature = buf.get_i16_le();
27413        __struct.temperature_press_diff = buf.get_i16_le();
27414        Ok(__struct)
27415    }
27416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27417        let mut __tmp = BytesMut::new(bytes);
27418        #[allow(clippy::absurd_extreme_comparisons)]
27419        #[allow(unused_comparisons)]
27420        if __tmp.remaining() < Self::ENCODED_LEN {
27421            panic!(
27422                "buffer is too small (need {} bytes, but got {})",
27423                Self::ENCODED_LEN,
27424                __tmp.remaining(),
27425            )
27426        }
27427        __tmp.put_u32_le(self.time_boot_ms);
27428        __tmp.put_f32_le(self.press_abs);
27429        __tmp.put_f32_le(self.press_diff);
27430        __tmp.put_i16_le(self.temperature);
27431        if matches!(version, MavlinkVersion::V2) {
27432            __tmp.put_i16_le(self.temperature_press_diff);
27433            let len = __tmp.len();
27434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27435        } else {
27436            __tmp.len()
27437        }
27438    }
27439}
27440#[doc = "Barometer readings for 3rd barometer."]
27441#[doc = ""]
27442#[doc = "ID: 143"]
27443#[derive(Debug, Clone, PartialEq)]
27444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27446#[cfg_attr(feature = "ts", derive(TS))]
27447#[cfg_attr(feature = "ts", ts(export))]
27448pub struct SCALED_PRESSURE3_DATA {
27449    #[doc = "Timestamp (time since system boot)."]
27450    pub time_boot_ms: u32,
27451    #[doc = "Absolute pressure"]
27452    pub press_abs: f32,
27453    #[doc = "Differential pressure"]
27454    pub press_diff: f32,
27455    #[doc = "Absolute pressure temperature"]
27456    pub temperature: i16,
27457    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27458    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27459    pub temperature_press_diff: i16,
27460}
27461impl SCALED_PRESSURE3_DATA {
27462    pub const ENCODED_LEN: usize = 16usize;
27463    pub const DEFAULT: Self = Self {
27464        time_boot_ms: 0_u32,
27465        press_abs: 0.0_f32,
27466        press_diff: 0.0_f32,
27467        temperature: 0_i16,
27468        temperature_press_diff: 0_i16,
27469    };
27470    #[cfg(feature = "arbitrary")]
27471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27472        use arbitrary::{Arbitrary, Unstructured};
27473        let mut buf = [0u8; 1024];
27474        rng.fill_bytes(&mut buf);
27475        let mut unstructured = Unstructured::new(&buf);
27476        Self::arbitrary(&mut unstructured).unwrap_or_default()
27477    }
27478}
27479impl Default for SCALED_PRESSURE3_DATA {
27480    fn default() -> Self {
27481        Self::DEFAULT.clone()
27482    }
27483}
27484impl MessageData for SCALED_PRESSURE3_DATA {
27485    type Message = MavMessage;
27486    const ID: u32 = 143u32;
27487    const NAME: &'static str = "SCALED_PRESSURE3";
27488    const EXTRA_CRC: u8 = 131u8;
27489    const ENCODED_LEN: usize = 16usize;
27490    fn deser(
27491        _version: MavlinkVersion,
27492        __input: &[u8],
27493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27494        let avail_len = __input.len();
27495        let mut payload_buf = [0; Self::ENCODED_LEN];
27496        let mut buf = if avail_len < Self::ENCODED_LEN {
27497            payload_buf[0..avail_len].copy_from_slice(__input);
27498            Bytes::new(&payload_buf)
27499        } else {
27500            Bytes::new(__input)
27501        };
27502        let mut __struct = Self::default();
27503        __struct.time_boot_ms = buf.get_u32_le();
27504        __struct.press_abs = buf.get_f32_le();
27505        __struct.press_diff = buf.get_f32_le();
27506        __struct.temperature = buf.get_i16_le();
27507        __struct.temperature_press_diff = buf.get_i16_le();
27508        Ok(__struct)
27509    }
27510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27511        let mut __tmp = BytesMut::new(bytes);
27512        #[allow(clippy::absurd_extreme_comparisons)]
27513        #[allow(unused_comparisons)]
27514        if __tmp.remaining() < Self::ENCODED_LEN {
27515            panic!(
27516                "buffer is too small (need {} bytes, but got {})",
27517                Self::ENCODED_LEN,
27518                __tmp.remaining(),
27519            )
27520        }
27521        __tmp.put_u32_le(self.time_boot_ms);
27522        __tmp.put_f32_le(self.press_abs);
27523        __tmp.put_f32_le(self.press_diff);
27524        __tmp.put_i16_le(self.temperature);
27525        if matches!(version, MavlinkVersion::V2) {
27526            __tmp.put_i16_le(self.temperature_press_diff);
27527            let len = __tmp.len();
27528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27529        } else {
27530            __tmp.len()
27531        }
27532    }
27533}
27534#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27535#[doc = ""]
27536#[doc = "ID: 126"]
27537#[derive(Debug, Clone, PartialEq)]
27538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27540#[cfg_attr(feature = "ts", derive(TS))]
27541#[cfg_attr(feature = "ts", ts(export))]
27542pub struct SERIAL_CONTROL_DATA {
27543    #[doc = "Baudrate of transfer. Zero means no change."]
27544    pub baudrate: u32,
27545    #[doc = "Timeout for reply data"]
27546    pub timeout: u16,
27547    #[doc = "Serial control device type."]
27548    pub device: SerialControlDev,
27549    #[doc = "Bitmap of serial control flags."]
27550    pub flags: SerialControlFlag,
27551    #[doc = "how many bytes in this transfer"]
27552    pub count: u8,
27553    #[doc = "serial data"]
27554    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27555    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27556    pub data: [u8; 70],
27557    #[doc = "System ID"]
27558    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27559    pub target_system: u8,
27560    #[doc = "Component ID"]
27561    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27562    pub target_component: u8,
27563}
27564impl SERIAL_CONTROL_DATA {
27565    pub const ENCODED_LEN: usize = 81usize;
27566    pub const DEFAULT: Self = Self {
27567        baudrate: 0_u32,
27568        timeout: 0_u16,
27569        device: SerialControlDev::DEFAULT,
27570        flags: SerialControlFlag::DEFAULT,
27571        count: 0_u8,
27572        data: [0_u8; 70usize],
27573        target_system: 0_u8,
27574        target_component: 0_u8,
27575    };
27576    #[cfg(feature = "arbitrary")]
27577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27578        use arbitrary::{Arbitrary, Unstructured};
27579        let mut buf = [0u8; 1024];
27580        rng.fill_bytes(&mut buf);
27581        let mut unstructured = Unstructured::new(&buf);
27582        Self::arbitrary(&mut unstructured).unwrap_or_default()
27583    }
27584}
27585impl Default for SERIAL_CONTROL_DATA {
27586    fn default() -> Self {
27587        Self::DEFAULT.clone()
27588    }
27589}
27590impl MessageData for SERIAL_CONTROL_DATA {
27591    type Message = MavMessage;
27592    const ID: u32 = 126u32;
27593    const NAME: &'static str = "SERIAL_CONTROL";
27594    const EXTRA_CRC: u8 = 220u8;
27595    const ENCODED_LEN: usize = 81usize;
27596    fn deser(
27597        _version: MavlinkVersion,
27598        __input: &[u8],
27599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27600        let avail_len = __input.len();
27601        let mut payload_buf = [0; Self::ENCODED_LEN];
27602        let mut buf = if avail_len < Self::ENCODED_LEN {
27603            payload_buf[0..avail_len].copy_from_slice(__input);
27604            Bytes::new(&payload_buf)
27605        } else {
27606            Bytes::new(__input)
27607        };
27608        let mut __struct = Self::default();
27609        __struct.baudrate = buf.get_u32_le();
27610        __struct.timeout = buf.get_u16_le();
27611        let tmp = buf.get_u8();
27612        __struct.device =
27613            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27614                enum_type: "SerialControlDev",
27615                value: tmp as u32,
27616            })?;
27617        let tmp = buf.get_u8();
27618        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27619            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27620                flag_type: "SerialControlFlag",
27621                value: tmp as u32,
27622            })?;
27623        __struct.count = buf.get_u8();
27624        for v in &mut __struct.data {
27625            let val = buf.get_u8();
27626            *v = val;
27627        }
27628        __struct.target_system = buf.get_u8();
27629        __struct.target_component = buf.get_u8();
27630        Ok(__struct)
27631    }
27632    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27633        let mut __tmp = BytesMut::new(bytes);
27634        #[allow(clippy::absurd_extreme_comparisons)]
27635        #[allow(unused_comparisons)]
27636        if __tmp.remaining() < Self::ENCODED_LEN {
27637            panic!(
27638                "buffer is too small (need {} bytes, but got {})",
27639                Self::ENCODED_LEN,
27640                __tmp.remaining(),
27641            )
27642        }
27643        __tmp.put_u32_le(self.baudrate);
27644        __tmp.put_u16_le(self.timeout);
27645        __tmp.put_u8(self.device as u8);
27646        __tmp.put_u8(self.flags.bits());
27647        __tmp.put_u8(self.count);
27648        for val in &self.data {
27649            __tmp.put_u8(*val);
27650        }
27651        if matches!(version, MavlinkVersion::V2) {
27652            __tmp.put_u8(self.target_system);
27653            __tmp.put_u8(self.target_component);
27654            let len = __tmp.len();
27655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27656        } else {
27657            __tmp.len()
27658        }
27659    }
27660}
27661#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27662#[doc = ""]
27663#[doc = "ID: 36"]
27664#[derive(Debug, Clone, PartialEq)]
27665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27667#[cfg_attr(feature = "ts", derive(TS))]
27668#[cfg_attr(feature = "ts", ts(export))]
27669pub struct SERVO_OUTPUT_RAW_DATA {
27670    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27671    pub time_usec: u32,
27672    #[doc = "Servo output 1 value"]
27673    pub servo1_raw: u16,
27674    #[doc = "Servo output 2 value"]
27675    pub servo2_raw: u16,
27676    #[doc = "Servo output 3 value"]
27677    pub servo3_raw: u16,
27678    #[doc = "Servo output 4 value"]
27679    pub servo4_raw: u16,
27680    #[doc = "Servo output 5 value"]
27681    pub servo5_raw: u16,
27682    #[doc = "Servo output 6 value"]
27683    pub servo6_raw: u16,
27684    #[doc = "Servo output 7 value"]
27685    pub servo7_raw: u16,
27686    #[doc = "Servo output 8 value"]
27687    pub servo8_raw: u16,
27688    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27689    pub port: u8,
27690    #[doc = "Servo output 9 value"]
27691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27692    pub servo9_raw: u16,
27693    #[doc = "Servo output 10 value"]
27694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27695    pub servo10_raw: u16,
27696    #[doc = "Servo output 11 value"]
27697    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27698    pub servo11_raw: u16,
27699    #[doc = "Servo output 12 value"]
27700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27701    pub servo12_raw: u16,
27702    #[doc = "Servo output 13 value"]
27703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27704    pub servo13_raw: u16,
27705    #[doc = "Servo output 14 value"]
27706    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27707    pub servo14_raw: u16,
27708    #[doc = "Servo output 15 value"]
27709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27710    pub servo15_raw: u16,
27711    #[doc = "Servo output 16 value"]
27712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27713    pub servo16_raw: u16,
27714}
27715impl SERVO_OUTPUT_RAW_DATA {
27716    pub const ENCODED_LEN: usize = 37usize;
27717    pub const DEFAULT: Self = Self {
27718        time_usec: 0_u32,
27719        servo1_raw: 0_u16,
27720        servo2_raw: 0_u16,
27721        servo3_raw: 0_u16,
27722        servo4_raw: 0_u16,
27723        servo5_raw: 0_u16,
27724        servo6_raw: 0_u16,
27725        servo7_raw: 0_u16,
27726        servo8_raw: 0_u16,
27727        port: 0_u8,
27728        servo9_raw: 0_u16,
27729        servo10_raw: 0_u16,
27730        servo11_raw: 0_u16,
27731        servo12_raw: 0_u16,
27732        servo13_raw: 0_u16,
27733        servo14_raw: 0_u16,
27734        servo15_raw: 0_u16,
27735        servo16_raw: 0_u16,
27736    };
27737    #[cfg(feature = "arbitrary")]
27738    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27739        use arbitrary::{Arbitrary, Unstructured};
27740        let mut buf = [0u8; 1024];
27741        rng.fill_bytes(&mut buf);
27742        let mut unstructured = Unstructured::new(&buf);
27743        Self::arbitrary(&mut unstructured).unwrap_or_default()
27744    }
27745}
27746impl Default for SERVO_OUTPUT_RAW_DATA {
27747    fn default() -> Self {
27748        Self::DEFAULT.clone()
27749    }
27750}
27751impl MessageData for SERVO_OUTPUT_RAW_DATA {
27752    type Message = MavMessage;
27753    const ID: u32 = 36u32;
27754    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27755    const EXTRA_CRC: u8 = 222u8;
27756    const ENCODED_LEN: usize = 37usize;
27757    fn deser(
27758        _version: MavlinkVersion,
27759        __input: &[u8],
27760    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27761        let avail_len = __input.len();
27762        let mut payload_buf = [0; Self::ENCODED_LEN];
27763        let mut buf = if avail_len < Self::ENCODED_LEN {
27764            payload_buf[0..avail_len].copy_from_slice(__input);
27765            Bytes::new(&payload_buf)
27766        } else {
27767            Bytes::new(__input)
27768        };
27769        let mut __struct = Self::default();
27770        __struct.time_usec = buf.get_u32_le();
27771        __struct.servo1_raw = buf.get_u16_le();
27772        __struct.servo2_raw = buf.get_u16_le();
27773        __struct.servo3_raw = buf.get_u16_le();
27774        __struct.servo4_raw = buf.get_u16_le();
27775        __struct.servo5_raw = buf.get_u16_le();
27776        __struct.servo6_raw = buf.get_u16_le();
27777        __struct.servo7_raw = buf.get_u16_le();
27778        __struct.servo8_raw = buf.get_u16_le();
27779        __struct.port = buf.get_u8();
27780        __struct.servo9_raw = buf.get_u16_le();
27781        __struct.servo10_raw = buf.get_u16_le();
27782        __struct.servo11_raw = buf.get_u16_le();
27783        __struct.servo12_raw = buf.get_u16_le();
27784        __struct.servo13_raw = buf.get_u16_le();
27785        __struct.servo14_raw = buf.get_u16_le();
27786        __struct.servo15_raw = buf.get_u16_le();
27787        __struct.servo16_raw = buf.get_u16_le();
27788        Ok(__struct)
27789    }
27790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27791        let mut __tmp = BytesMut::new(bytes);
27792        #[allow(clippy::absurd_extreme_comparisons)]
27793        #[allow(unused_comparisons)]
27794        if __tmp.remaining() < Self::ENCODED_LEN {
27795            panic!(
27796                "buffer is too small (need {} bytes, but got {})",
27797                Self::ENCODED_LEN,
27798                __tmp.remaining(),
27799            )
27800        }
27801        __tmp.put_u32_le(self.time_usec);
27802        __tmp.put_u16_le(self.servo1_raw);
27803        __tmp.put_u16_le(self.servo2_raw);
27804        __tmp.put_u16_le(self.servo3_raw);
27805        __tmp.put_u16_le(self.servo4_raw);
27806        __tmp.put_u16_le(self.servo5_raw);
27807        __tmp.put_u16_le(self.servo6_raw);
27808        __tmp.put_u16_le(self.servo7_raw);
27809        __tmp.put_u16_le(self.servo8_raw);
27810        __tmp.put_u8(self.port);
27811        if matches!(version, MavlinkVersion::V2) {
27812            __tmp.put_u16_le(self.servo9_raw);
27813            __tmp.put_u16_le(self.servo10_raw);
27814            __tmp.put_u16_le(self.servo11_raw);
27815            __tmp.put_u16_le(self.servo12_raw);
27816            __tmp.put_u16_le(self.servo13_raw);
27817            __tmp.put_u16_le(self.servo14_raw);
27818            __tmp.put_u16_le(self.servo15_raw);
27819            __tmp.put_u16_le(self.servo16_raw);
27820            let len = __tmp.len();
27821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27822        } else {
27823            __tmp.len()
27824        }
27825    }
27826}
27827#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27828#[doc = ""]
27829#[doc = "ID: 256"]
27830#[derive(Debug, Clone, PartialEq)]
27831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27833#[cfg_attr(feature = "ts", derive(TS))]
27834#[cfg_attr(feature = "ts", ts(export))]
27835pub struct SETUP_SIGNING_DATA {
27836    #[doc = "initial timestamp"]
27837    pub initial_timestamp: u64,
27838    #[doc = "system id of the target"]
27839    pub target_system: u8,
27840    #[doc = "component ID of the target"]
27841    pub target_component: u8,
27842    #[doc = "signing key"]
27843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27845    pub secret_key: [u8; 32],
27846}
27847impl SETUP_SIGNING_DATA {
27848    pub const ENCODED_LEN: usize = 42usize;
27849    pub const DEFAULT: Self = Self {
27850        initial_timestamp: 0_u64,
27851        target_system: 0_u8,
27852        target_component: 0_u8,
27853        secret_key: [0_u8; 32usize],
27854    };
27855    #[cfg(feature = "arbitrary")]
27856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27857        use arbitrary::{Arbitrary, Unstructured};
27858        let mut buf = [0u8; 1024];
27859        rng.fill_bytes(&mut buf);
27860        let mut unstructured = Unstructured::new(&buf);
27861        Self::arbitrary(&mut unstructured).unwrap_or_default()
27862    }
27863}
27864impl Default for SETUP_SIGNING_DATA {
27865    fn default() -> Self {
27866        Self::DEFAULT.clone()
27867    }
27868}
27869impl MessageData for SETUP_SIGNING_DATA {
27870    type Message = MavMessage;
27871    const ID: u32 = 256u32;
27872    const NAME: &'static str = "SETUP_SIGNING";
27873    const EXTRA_CRC: u8 = 71u8;
27874    const ENCODED_LEN: usize = 42usize;
27875    fn deser(
27876        _version: MavlinkVersion,
27877        __input: &[u8],
27878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27879        let avail_len = __input.len();
27880        let mut payload_buf = [0; Self::ENCODED_LEN];
27881        let mut buf = if avail_len < Self::ENCODED_LEN {
27882            payload_buf[0..avail_len].copy_from_slice(__input);
27883            Bytes::new(&payload_buf)
27884        } else {
27885            Bytes::new(__input)
27886        };
27887        let mut __struct = Self::default();
27888        __struct.initial_timestamp = buf.get_u64_le();
27889        __struct.target_system = buf.get_u8();
27890        __struct.target_component = buf.get_u8();
27891        for v in &mut __struct.secret_key {
27892            let val = buf.get_u8();
27893            *v = val;
27894        }
27895        Ok(__struct)
27896    }
27897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27898        let mut __tmp = BytesMut::new(bytes);
27899        #[allow(clippy::absurd_extreme_comparisons)]
27900        #[allow(unused_comparisons)]
27901        if __tmp.remaining() < Self::ENCODED_LEN {
27902            panic!(
27903                "buffer is too small (need {} bytes, but got {})",
27904                Self::ENCODED_LEN,
27905                __tmp.remaining(),
27906            )
27907        }
27908        __tmp.put_u64_le(self.initial_timestamp);
27909        __tmp.put_u8(self.target_system);
27910        __tmp.put_u8(self.target_component);
27911        for val in &self.secret_key {
27912            __tmp.put_u8(*val);
27913        }
27914        if matches!(version, MavlinkVersion::V2) {
27915            let len = __tmp.len();
27916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27917        } else {
27918            __tmp.len()
27919        }
27920    }
27921}
27922#[doc = "Set the vehicle attitude and body angular rates."]
27923#[doc = ""]
27924#[doc = "ID: 139"]
27925#[derive(Debug, Clone, PartialEq)]
27926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27928#[cfg_attr(feature = "ts", derive(TS))]
27929#[cfg_attr(feature = "ts", ts(export))]
27930pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27931    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27932    pub time_usec: u64,
27933    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27934    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27935    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27936    pub controls: [f32; 8],
27937    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27938    pub group_mlx: u8,
27939    #[doc = "System ID"]
27940    pub target_system: u8,
27941    #[doc = "Component ID"]
27942    pub target_component: u8,
27943}
27944impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27945    pub const ENCODED_LEN: usize = 43usize;
27946    pub const DEFAULT: Self = Self {
27947        time_usec: 0_u64,
27948        controls: [0.0_f32; 8usize],
27949        group_mlx: 0_u8,
27950        target_system: 0_u8,
27951        target_component: 0_u8,
27952    };
27953    #[cfg(feature = "arbitrary")]
27954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27955        use arbitrary::{Arbitrary, Unstructured};
27956        let mut buf = [0u8; 1024];
27957        rng.fill_bytes(&mut buf);
27958        let mut unstructured = Unstructured::new(&buf);
27959        Self::arbitrary(&mut unstructured).unwrap_or_default()
27960    }
27961}
27962impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27963    fn default() -> Self {
27964        Self::DEFAULT.clone()
27965    }
27966}
27967impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27968    type Message = MavMessage;
27969    const ID: u32 = 139u32;
27970    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27971    const EXTRA_CRC: u8 = 168u8;
27972    const ENCODED_LEN: usize = 43usize;
27973    fn deser(
27974        _version: MavlinkVersion,
27975        __input: &[u8],
27976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27977        let avail_len = __input.len();
27978        let mut payload_buf = [0; Self::ENCODED_LEN];
27979        let mut buf = if avail_len < Self::ENCODED_LEN {
27980            payload_buf[0..avail_len].copy_from_slice(__input);
27981            Bytes::new(&payload_buf)
27982        } else {
27983            Bytes::new(__input)
27984        };
27985        let mut __struct = Self::default();
27986        __struct.time_usec = buf.get_u64_le();
27987        for v in &mut __struct.controls {
27988            let val = buf.get_f32_le();
27989            *v = val;
27990        }
27991        __struct.group_mlx = buf.get_u8();
27992        __struct.target_system = buf.get_u8();
27993        __struct.target_component = buf.get_u8();
27994        Ok(__struct)
27995    }
27996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27997        let mut __tmp = BytesMut::new(bytes);
27998        #[allow(clippy::absurd_extreme_comparisons)]
27999        #[allow(unused_comparisons)]
28000        if __tmp.remaining() < Self::ENCODED_LEN {
28001            panic!(
28002                "buffer is too small (need {} bytes, but got {})",
28003                Self::ENCODED_LEN,
28004                __tmp.remaining(),
28005            )
28006        }
28007        __tmp.put_u64_le(self.time_usec);
28008        for val in &self.controls {
28009            __tmp.put_f32_le(*val);
28010        }
28011        __tmp.put_u8(self.group_mlx);
28012        __tmp.put_u8(self.target_system);
28013        __tmp.put_u8(self.target_component);
28014        if matches!(version, MavlinkVersion::V2) {
28015            let len = __tmp.len();
28016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28017        } else {
28018            __tmp.len()
28019        }
28020    }
28021}
28022#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28023#[doc = ""]
28024#[doc = "ID: 82"]
28025#[derive(Debug, Clone, PartialEq)]
28026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28028#[cfg_attr(feature = "ts", derive(TS))]
28029#[cfg_attr(feature = "ts", ts(export))]
28030pub struct SET_ATTITUDE_TARGET_DATA {
28031    #[doc = "Timestamp (time since system boot)."]
28032    pub time_boot_ms: u32,
28033    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28034    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28035    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28036    pub q: [f32; 4],
28037    #[doc = "Body roll rate"]
28038    pub body_roll_rate: f32,
28039    #[doc = "Body pitch rate"]
28040    pub body_pitch_rate: f32,
28041    #[doc = "Body yaw rate"]
28042    pub body_yaw_rate: f32,
28043    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28044    pub thrust: f32,
28045    #[doc = "System ID"]
28046    pub target_system: u8,
28047    #[doc = "Component ID"]
28048    pub target_component: u8,
28049    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28050    pub type_mask: AttitudeTargetTypemask,
28051    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28052    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28054    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28055    pub thrust_body: [f32; 3],
28056}
28057impl SET_ATTITUDE_TARGET_DATA {
28058    pub const ENCODED_LEN: usize = 51usize;
28059    pub const DEFAULT: Self = Self {
28060        time_boot_ms: 0_u32,
28061        q: [0.0_f32; 4usize],
28062        body_roll_rate: 0.0_f32,
28063        body_pitch_rate: 0.0_f32,
28064        body_yaw_rate: 0.0_f32,
28065        thrust: 0.0_f32,
28066        target_system: 0_u8,
28067        target_component: 0_u8,
28068        type_mask: AttitudeTargetTypemask::DEFAULT,
28069        thrust_body: [0.0_f32; 3usize],
28070    };
28071    #[cfg(feature = "arbitrary")]
28072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28073        use arbitrary::{Arbitrary, Unstructured};
28074        let mut buf = [0u8; 1024];
28075        rng.fill_bytes(&mut buf);
28076        let mut unstructured = Unstructured::new(&buf);
28077        Self::arbitrary(&mut unstructured).unwrap_or_default()
28078    }
28079}
28080impl Default for SET_ATTITUDE_TARGET_DATA {
28081    fn default() -> Self {
28082        Self::DEFAULT.clone()
28083    }
28084}
28085impl MessageData for SET_ATTITUDE_TARGET_DATA {
28086    type Message = MavMessage;
28087    const ID: u32 = 82u32;
28088    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28089    const EXTRA_CRC: u8 = 49u8;
28090    const ENCODED_LEN: usize = 51usize;
28091    fn deser(
28092        _version: MavlinkVersion,
28093        __input: &[u8],
28094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28095        let avail_len = __input.len();
28096        let mut payload_buf = [0; Self::ENCODED_LEN];
28097        let mut buf = if avail_len < Self::ENCODED_LEN {
28098            payload_buf[0..avail_len].copy_from_slice(__input);
28099            Bytes::new(&payload_buf)
28100        } else {
28101            Bytes::new(__input)
28102        };
28103        let mut __struct = Self::default();
28104        __struct.time_boot_ms = buf.get_u32_le();
28105        for v in &mut __struct.q {
28106            let val = buf.get_f32_le();
28107            *v = val;
28108        }
28109        __struct.body_roll_rate = buf.get_f32_le();
28110        __struct.body_pitch_rate = buf.get_f32_le();
28111        __struct.body_yaw_rate = buf.get_f32_le();
28112        __struct.thrust = buf.get_f32_le();
28113        __struct.target_system = buf.get_u8();
28114        __struct.target_component = buf.get_u8();
28115        let tmp = buf.get_u8();
28116        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28117            tmp & AttitudeTargetTypemask::all().bits(),
28118        )
28119        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28120            flag_type: "AttitudeTargetTypemask",
28121            value: tmp as u32,
28122        })?;
28123        for v in &mut __struct.thrust_body {
28124            let val = buf.get_f32_le();
28125            *v = val;
28126        }
28127        Ok(__struct)
28128    }
28129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28130        let mut __tmp = BytesMut::new(bytes);
28131        #[allow(clippy::absurd_extreme_comparisons)]
28132        #[allow(unused_comparisons)]
28133        if __tmp.remaining() < Self::ENCODED_LEN {
28134            panic!(
28135                "buffer is too small (need {} bytes, but got {})",
28136                Self::ENCODED_LEN,
28137                __tmp.remaining(),
28138            )
28139        }
28140        __tmp.put_u32_le(self.time_boot_ms);
28141        for val in &self.q {
28142            __tmp.put_f32_le(*val);
28143        }
28144        __tmp.put_f32_le(self.body_roll_rate);
28145        __tmp.put_f32_le(self.body_pitch_rate);
28146        __tmp.put_f32_le(self.body_yaw_rate);
28147        __tmp.put_f32_le(self.thrust);
28148        __tmp.put_u8(self.target_system);
28149        __tmp.put_u8(self.target_component);
28150        __tmp.put_u8(self.type_mask.bits());
28151        if matches!(version, MavlinkVersion::V2) {
28152            for val in &self.thrust_body {
28153                __tmp.put_f32_le(*val);
28154            }
28155            let len = __tmp.len();
28156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28157        } else {
28158            __tmp.len()
28159        }
28160    }
28161}
28162#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28163#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28164#[doc = ""]
28165#[doc = "ID: 48"]
28166#[derive(Debug, Clone, PartialEq)]
28167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28169#[cfg_attr(feature = "ts", derive(TS))]
28170#[cfg_attr(feature = "ts", ts(export))]
28171pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28172    #[doc = "Latitude (WGS84)"]
28173    pub latitude: i32,
28174    #[doc = "Longitude (WGS84)"]
28175    pub longitude: i32,
28176    #[doc = "Altitude (MSL). Positive for up."]
28177    pub altitude: i32,
28178    #[doc = "System ID"]
28179    pub target_system: u8,
28180    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28181    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28182    pub time_usec: u64,
28183}
28184impl SET_GPS_GLOBAL_ORIGIN_DATA {
28185    pub const ENCODED_LEN: usize = 21usize;
28186    pub const DEFAULT: Self = Self {
28187        latitude: 0_i32,
28188        longitude: 0_i32,
28189        altitude: 0_i32,
28190        target_system: 0_u8,
28191        time_usec: 0_u64,
28192    };
28193    #[cfg(feature = "arbitrary")]
28194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28195        use arbitrary::{Arbitrary, Unstructured};
28196        let mut buf = [0u8; 1024];
28197        rng.fill_bytes(&mut buf);
28198        let mut unstructured = Unstructured::new(&buf);
28199        Self::arbitrary(&mut unstructured).unwrap_or_default()
28200    }
28201}
28202impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28203    fn default() -> Self {
28204        Self::DEFAULT.clone()
28205    }
28206}
28207impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28208    type Message = MavMessage;
28209    const ID: u32 = 48u32;
28210    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28211    const EXTRA_CRC: u8 = 41u8;
28212    const ENCODED_LEN: usize = 21usize;
28213    fn deser(
28214        _version: MavlinkVersion,
28215        __input: &[u8],
28216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28217        let avail_len = __input.len();
28218        let mut payload_buf = [0; Self::ENCODED_LEN];
28219        let mut buf = if avail_len < Self::ENCODED_LEN {
28220            payload_buf[0..avail_len].copy_from_slice(__input);
28221            Bytes::new(&payload_buf)
28222        } else {
28223            Bytes::new(__input)
28224        };
28225        let mut __struct = Self::default();
28226        __struct.latitude = buf.get_i32_le();
28227        __struct.longitude = buf.get_i32_le();
28228        __struct.altitude = buf.get_i32_le();
28229        __struct.target_system = buf.get_u8();
28230        __struct.time_usec = buf.get_u64_le();
28231        Ok(__struct)
28232    }
28233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28234        let mut __tmp = BytesMut::new(bytes);
28235        #[allow(clippy::absurd_extreme_comparisons)]
28236        #[allow(unused_comparisons)]
28237        if __tmp.remaining() < Self::ENCODED_LEN {
28238            panic!(
28239                "buffer is too small (need {} bytes, but got {})",
28240                Self::ENCODED_LEN,
28241                __tmp.remaining(),
28242            )
28243        }
28244        __tmp.put_i32_le(self.latitude);
28245        __tmp.put_i32_le(self.longitude);
28246        __tmp.put_i32_le(self.altitude);
28247        __tmp.put_u8(self.target_system);
28248        if matches!(version, MavlinkVersion::V2) {
28249            __tmp.put_u64_le(self.time_usec);
28250            let len = __tmp.len();
28251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28252        } else {
28253            __tmp.len()
28254        }
28255    }
28256}
28257#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28258#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28259#[doc = ""]
28260#[doc = "ID: 243"]
28261#[derive(Debug, Clone, PartialEq)]
28262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28264#[cfg_attr(feature = "ts", derive(TS))]
28265#[cfg_attr(feature = "ts", ts(export))]
28266pub struct SET_HOME_POSITION_DATA {
28267    #[doc = "Latitude (WGS84)"]
28268    pub latitude: i32,
28269    #[doc = "Longitude (WGS84)"]
28270    pub longitude: i32,
28271    #[doc = "Altitude (MSL). Positive for up."]
28272    pub altitude: i32,
28273    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28274    pub x: f32,
28275    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28276    pub y: f32,
28277    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28278    pub z: f32,
28279    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28281    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28282    pub q: [f32; 4],
28283    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28284    pub approach_x: f32,
28285    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28286    pub approach_y: f32,
28287    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28288    pub approach_z: f32,
28289    #[doc = "System ID."]
28290    pub target_system: u8,
28291    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28292    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28293    pub time_usec: u64,
28294}
28295impl SET_HOME_POSITION_DATA {
28296    pub const ENCODED_LEN: usize = 61usize;
28297    pub const DEFAULT: Self = Self {
28298        latitude: 0_i32,
28299        longitude: 0_i32,
28300        altitude: 0_i32,
28301        x: 0.0_f32,
28302        y: 0.0_f32,
28303        z: 0.0_f32,
28304        q: [0.0_f32; 4usize],
28305        approach_x: 0.0_f32,
28306        approach_y: 0.0_f32,
28307        approach_z: 0.0_f32,
28308        target_system: 0_u8,
28309        time_usec: 0_u64,
28310    };
28311    #[cfg(feature = "arbitrary")]
28312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28313        use arbitrary::{Arbitrary, Unstructured};
28314        let mut buf = [0u8; 1024];
28315        rng.fill_bytes(&mut buf);
28316        let mut unstructured = Unstructured::new(&buf);
28317        Self::arbitrary(&mut unstructured).unwrap_or_default()
28318    }
28319}
28320impl Default for SET_HOME_POSITION_DATA {
28321    fn default() -> Self {
28322        Self::DEFAULT.clone()
28323    }
28324}
28325impl MessageData for SET_HOME_POSITION_DATA {
28326    type Message = MavMessage;
28327    const ID: u32 = 243u32;
28328    const NAME: &'static str = "SET_HOME_POSITION";
28329    const EXTRA_CRC: u8 = 85u8;
28330    const ENCODED_LEN: usize = 61usize;
28331    fn deser(
28332        _version: MavlinkVersion,
28333        __input: &[u8],
28334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28335        let avail_len = __input.len();
28336        let mut payload_buf = [0; Self::ENCODED_LEN];
28337        let mut buf = if avail_len < Self::ENCODED_LEN {
28338            payload_buf[0..avail_len].copy_from_slice(__input);
28339            Bytes::new(&payload_buf)
28340        } else {
28341            Bytes::new(__input)
28342        };
28343        let mut __struct = Self::default();
28344        __struct.latitude = buf.get_i32_le();
28345        __struct.longitude = buf.get_i32_le();
28346        __struct.altitude = buf.get_i32_le();
28347        __struct.x = buf.get_f32_le();
28348        __struct.y = buf.get_f32_le();
28349        __struct.z = buf.get_f32_le();
28350        for v in &mut __struct.q {
28351            let val = buf.get_f32_le();
28352            *v = val;
28353        }
28354        __struct.approach_x = buf.get_f32_le();
28355        __struct.approach_y = buf.get_f32_le();
28356        __struct.approach_z = buf.get_f32_le();
28357        __struct.target_system = buf.get_u8();
28358        __struct.time_usec = buf.get_u64_le();
28359        Ok(__struct)
28360    }
28361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28362        let mut __tmp = BytesMut::new(bytes);
28363        #[allow(clippy::absurd_extreme_comparisons)]
28364        #[allow(unused_comparisons)]
28365        if __tmp.remaining() < Self::ENCODED_LEN {
28366            panic!(
28367                "buffer is too small (need {} bytes, but got {})",
28368                Self::ENCODED_LEN,
28369                __tmp.remaining(),
28370            )
28371        }
28372        __tmp.put_i32_le(self.latitude);
28373        __tmp.put_i32_le(self.longitude);
28374        __tmp.put_i32_le(self.altitude);
28375        __tmp.put_f32_le(self.x);
28376        __tmp.put_f32_le(self.y);
28377        __tmp.put_f32_le(self.z);
28378        for val in &self.q {
28379            __tmp.put_f32_le(*val);
28380        }
28381        __tmp.put_f32_le(self.approach_x);
28382        __tmp.put_f32_le(self.approach_y);
28383        __tmp.put_f32_le(self.approach_z);
28384        __tmp.put_u8(self.target_system);
28385        if matches!(version, MavlinkVersion::V2) {
28386            __tmp.put_u64_le(self.time_usec);
28387            let len = __tmp.len();
28388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28389        } else {
28390            __tmp.len()
28391        }
28392    }
28393}
28394#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28395#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28396#[doc = ""]
28397#[doc = "ID: 11"]
28398#[derive(Debug, Clone, PartialEq)]
28399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28401#[cfg_attr(feature = "ts", derive(TS))]
28402#[cfg_attr(feature = "ts", ts(export))]
28403pub struct SET_MODE_DATA {
28404    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28405    pub custom_mode: u32,
28406    #[doc = "The system setting the mode"]
28407    pub target_system: u8,
28408    #[doc = "The new base mode."]
28409    pub base_mode: MavMode,
28410}
28411impl SET_MODE_DATA {
28412    pub const ENCODED_LEN: usize = 6usize;
28413    pub const DEFAULT: Self = Self {
28414        custom_mode: 0_u32,
28415        target_system: 0_u8,
28416        base_mode: MavMode::DEFAULT,
28417    };
28418    #[cfg(feature = "arbitrary")]
28419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28420        use arbitrary::{Arbitrary, Unstructured};
28421        let mut buf = [0u8; 1024];
28422        rng.fill_bytes(&mut buf);
28423        let mut unstructured = Unstructured::new(&buf);
28424        Self::arbitrary(&mut unstructured).unwrap_or_default()
28425    }
28426}
28427impl Default for SET_MODE_DATA {
28428    fn default() -> Self {
28429        Self::DEFAULT.clone()
28430    }
28431}
28432impl MessageData for SET_MODE_DATA {
28433    type Message = MavMessage;
28434    const ID: u32 = 11u32;
28435    const NAME: &'static str = "SET_MODE";
28436    const EXTRA_CRC: u8 = 89u8;
28437    const ENCODED_LEN: usize = 6usize;
28438    fn deser(
28439        _version: MavlinkVersion,
28440        __input: &[u8],
28441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28442        let avail_len = __input.len();
28443        let mut payload_buf = [0; Self::ENCODED_LEN];
28444        let mut buf = if avail_len < Self::ENCODED_LEN {
28445            payload_buf[0..avail_len].copy_from_slice(__input);
28446            Bytes::new(&payload_buf)
28447        } else {
28448            Bytes::new(__input)
28449        };
28450        let mut __struct = Self::default();
28451        __struct.custom_mode = buf.get_u32_le();
28452        __struct.target_system = buf.get_u8();
28453        let tmp = buf.get_u8();
28454        __struct.base_mode =
28455            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28456                enum_type: "MavMode",
28457                value: tmp as u32,
28458            })?;
28459        Ok(__struct)
28460    }
28461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28462        let mut __tmp = BytesMut::new(bytes);
28463        #[allow(clippy::absurd_extreme_comparisons)]
28464        #[allow(unused_comparisons)]
28465        if __tmp.remaining() < Self::ENCODED_LEN {
28466            panic!(
28467                "buffer is too small (need {} bytes, but got {})",
28468                Self::ENCODED_LEN,
28469                __tmp.remaining(),
28470            )
28471        }
28472        __tmp.put_u32_le(self.custom_mode);
28473        __tmp.put_u8(self.target_system);
28474        __tmp.put_u8(self.base_mode as u8);
28475        if matches!(version, MavlinkVersion::V2) {
28476            let len = __tmp.len();
28477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28478        } else {
28479            __tmp.len()
28480        }
28481    }
28482}
28483#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28484#[doc = ""]
28485#[doc = "ID: 86"]
28486#[derive(Debug, Clone, PartialEq)]
28487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28489#[cfg_attr(feature = "ts", derive(TS))]
28490#[cfg_attr(feature = "ts", ts(export))]
28491pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28492    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28493    pub time_boot_ms: u32,
28494    #[doc = "Latitude in WGS84 frame"]
28495    pub lat_int: i32,
28496    #[doc = "Longitude in WGS84 frame"]
28497    pub lon_int: i32,
28498    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28499    pub alt: f32,
28500    #[doc = "X velocity in NED frame"]
28501    pub vx: f32,
28502    #[doc = "Y velocity in NED frame"]
28503    pub vy: f32,
28504    #[doc = "Z velocity in NED frame"]
28505    pub vz: f32,
28506    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28507    pub afx: f32,
28508    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28509    pub afy: f32,
28510    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28511    pub afz: f32,
28512    #[doc = "yaw setpoint"]
28513    pub yaw: f32,
28514    #[doc = "yaw rate setpoint"]
28515    pub yaw_rate: f32,
28516    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28517    pub type_mask: PositionTargetTypemask,
28518    #[doc = "System ID"]
28519    pub target_system: u8,
28520    #[doc = "Component ID"]
28521    pub target_component: u8,
28522    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28523    pub coordinate_frame: MavFrame,
28524}
28525impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28526    pub const ENCODED_LEN: usize = 53usize;
28527    pub const DEFAULT: Self = Self {
28528        time_boot_ms: 0_u32,
28529        lat_int: 0_i32,
28530        lon_int: 0_i32,
28531        alt: 0.0_f32,
28532        vx: 0.0_f32,
28533        vy: 0.0_f32,
28534        vz: 0.0_f32,
28535        afx: 0.0_f32,
28536        afy: 0.0_f32,
28537        afz: 0.0_f32,
28538        yaw: 0.0_f32,
28539        yaw_rate: 0.0_f32,
28540        type_mask: PositionTargetTypemask::DEFAULT,
28541        target_system: 0_u8,
28542        target_component: 0_u8,
28543        coordinate_frame: MavFrame::DEFAULT,
28544    };
28545    #[cfg(feature = "arbitrary")]
28546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28547        use arbitrary::{Arbitrary, Unstructured};
28548        let mut buf = [0u8; 1024];
28549        rng.fill_bytes(&mut buf);
28550        let mut unstructured = Unstructured::new(&buf);
28551        Self::arbitrary(&mut unstructured).unwrap_or_default()
28552    }
28553}
28554impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28555    fn default() -> Self {
28556        Self::DEFAULT.clone()
28557    }
28558}
28559impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28560    type Message = MavMessage;
28561    const ID: u32 = 86u32;
28562    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28563    const EXTRA_CRC: u8 = 5u8;
28564    const ENCODED_LEN: usize = 53usize;
28565    fn deser(
28566        _version: MavlinkVersion,
28567        __input: &[u8],
28568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28569        let avail_len = __input.len();
28570        let mut payload_buf = [0; Self::ENCODED_LEN];
28571        let mut buf = if avail_len < Self::ENCODED_LEN {
28572            payload_buf[0..avail_len].copy_from_slice(__input);
28573            Bytes::new(&payload_buf)
28574        } else {
28575            Bytes::new(__input)
28576        };
28577        let mut __struct = Self::default();
28578        __struct.time_boot_ms = buf.get_u32_le();
28579        __struct.lat_int = buf.get_i32_le();
28580        __struct.lon_int = buf.get_i32_le();
28581        __struct.alt = buf.get_f32_le();
28582        __struct.vx = buf.get_f32_le();
28583        __struct.vy = buf.get_f32_le();
28584        __struct.vz = buf.get_f32_le();
28585        __struct.afx = buf.get_f32_le();
28586        __struct.afy = buf.get_f32_le();
28587        __struct.afz = buf.get_f32_le();
28588        __struct.yaw = buf.get_f32_le();
28589        __struct.yaw_rate = buf.get_f32_le();
28590        let tmp = buf.get_u16_le();
28591        __struct.type_mask = PositionTargetTypemask::from_bits(
28592            tmp & PositionTargetTypemask::all().bits(),
28593        )
28594        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28595            flag_type: "PositionTargetTypemask",
28596            value: tmp as u32,
28597        })?;
28598        __struct.target_system = buf.get_u8();
28599        __struct.target_component = buf.get_u8();
28600        let tmp = buf.get_u8();
28601        __struct.coordinate_frame =
28602            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28603                enum_type: "MavFrame",
28604                value: tmp as u32,
28605            })?;
28606        Ok(__struct)
28607    }
28608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28609        let mut __tmp = BytesMut::new(bytes);
28610        #[allow(clippy::absurd_extreme_comparisons)]
28611        #[allow(unused_comparisons)]
28612        if __tmp.remaining() < Self::ENCODED_LEN {
28613            panic!(
28614                "buffer is too small (need {} bytes, but got {})",
28615                Self::ENCODED_LEN,
28616                __tmp.remaining(),
28617            )
28618        }
28619        __tmp.put_u32_le(self.time_boot_ms);
28620        __tmp.put_i32_le(self.lat_int);
28621        __tmp.put_i32_le(self.lon_int);
28622        __tmp.put_f32_le(self.alt);
28623        __tmp.put_f32_le(self.vx);
28624        __tmp.put_f32_le(self.vy);
28625        __tmp.put_f32_le(self.vz);
28626        __tmp.put_f32_le(self.afx);
28627        __tmp.put_f32_le(self.afy);
28628        __tmp.put_f32_le(self.afz);
28629        __tmp.put_f32_le(self.yaw);
28630        __tmp.put_f32_le(self.yaw_rate);
28631        __tmp.put_u16_le(self.type_mask.bits());
28632        __tmp.put_u8(self.target_system);
28633        __tmp.put_u8(self.target_component);
28634        __tmp.put_u8(self.coordinate_frame as u8);
28635        if matches!(version, MavlinkVersion::V2) {
28636            let len = __tmp.len();
28637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28638        } else {
28639            __tmp.len()
28640        }
28641    }
28642}
28643#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28644#[doc = ""]
28645#[doc = "ID: 84"]
28646#[derive(Debug, Clone, PartialEq)]
28647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28649#[cfg_attr(feature = "ts", derive(TS))]
28650#[cfg_attr(feature = "ts", ts(export))]
28651pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28652    #[doc = "Timestamp (time since system boot)."]
28653    pub time_boot_ms: u32,
28654    #[doc = "X Position in NED frame"]
28655    pub x: f32,
28656    #[doc = "Y Position in NED frame"]
28657    pub y: f32,
28658    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28659    pub z: f32,
28660    #[doc = "X velocity in NED frame"]
28661    pub vx: f32,
28662    #[doc = "Y velocity in NED frame"]
28663    pub vy: f32,
28664    #[doc = "Z velocity in NED frame"]
28665    pub vz: f32,
28666    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28667    pub afx: f32,
28668    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28669    pub afy: f32,
28670    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28671    pub afz: f32,
28672    #[doc = "yaw setpoint"]
28673    pub yaw: f32,
28674    #[doc = "yaw rate setpoint"]
28675    pub yaw_rate: f32,
28676    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28677    pub type_mask: PositionTargetTypemask,
28678    #[doc = "System ID"]
28679    pub target_system: u8,
28680    #[doc = "Component ID"]
28681    pub target_component: u8,
28682    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28683    pub coordinate_frame: MavFrame,
28684}
28685impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28686    pub const ENCODED_LEN: usize = 53usize;
28687    pub const DEFAULT: Self = Self {
28688        time_boot_ms: 0_u32,
28689        x: 0.0_f32,
28690        y: 0.0_f32,
28691        z: 0.0_f32,
28692        vx: 0.0_f32,
28693        vy: 0.0_f32,
28694        vz: 0.0_f32,
28695        afx: 0.0_f32,
28696        afy: 0.0_f32,
28697        afz: 0.0_f32,
28698        yaw: 0.0_f32,
28699        yaw_rate: 0.0_f32,
28700        type_mask: PositionTargetTypemask::DEFAULT,
28701        target_system: 0_u8,
28702        target_component: 0_u8,
28703        coordinate_frame: MavFrame::DEFAULT,
28704    };
28705    #[cfg(feature = "arbitrary")]
28706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28707        use arbitrary::{Arbitrary, Unstructured};
28708        let mut buf = [0u8; 1024];
28709        rng.fill_bytes(&mut buf);
28710        let mut unstructured = Unstructured::new(&buf);
28711        Self::arbitrary(&mut unstructured).unwrap_or_default()
28712    }
28713}
28714impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28715    fn default() -> Self {
28716        Self::DEFAULT.clone()
28717    }
28718}
28719impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28720    type Message = MavMessage;
28721    const ID: u32 = 84u32;
28722    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28723    const EXTRA_CRC: u8 = 143u8;
28724    const ENCODED_LEN: usize = 53usize;
28725    fn deser(
28726        _version: MavlinkVersion,
28727        __input: &[u8],
28728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28729        let avail_len = __input.len();
28730        let mut payload_buf = [0; Self::ENCODED_LEN];
28731        let mut buf = if avail_len < Self::ENCODED_LEN {
28732            payload_buf[0..avail_len].copy_from_slice(__input);
28733            Bytes::new(&payload_buf)
28734        } else {
28735            Bytes::new(__input)
28736        };
28737        let mut __struct = Self::default();
28738        __struct.time_boot_ms = buf.get_u32_le();
28739        __struct.x = buf.get_f32_le();
28740        __struct.y = buf.get_f32_le();
28741        __struct.z = buf.get_f32_le();
28742        __struct.vx = buf.get_f32_le();
28743        __struct.vy = buf.get_f32_le();
28744        __struct.vz = buf.get_f32_le();
28745        __struct.afx = buf.get_f32_le();
28746        __struct.afy = buf.get_f32_le();
28747        __struct.afz = buf.get_f32_le();
28748        __struct.yaw = buf.get_f32_le();
28749        __struct.yaw_rate = buf.get_f32_le();
28750        let tmp = buf.get_u16_le();
28751        __struct.type_mask = PositionTargetTypemask::from_bits(
28752            tmp & PositionTargetTypemask::all().bits(),
28753        )
28754        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28755            flag_type: "PositionTargetTypemask",
28756            value: tmp as u32,
28757        })?;
28758        __struct.target_system = buf.get_u8();
28759        __struct.target_component = buf.get_u8();
28760        let tmp = buf.get_u8();
28761        __struct.coordinate_frame =
28762            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28763                enum_type: "MavFrame",
28764                value: tmp as u32,
28765            })?;
28766        Ok(__struct)
28767    }
28768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28769        let mut __tmp = BytesMut::new(bytes);
28770        #[allow(clippy::absurd_extreme_comparisons)]
28771        #[allow(unused_comparisons)]
28772        if __tmp.remaining() < Self::ENCODED_LEN {
28773            panic!(
28774                "buffer is too small (need {} bytes, but got {})",
28775                Self::ENCODED_LEN,
28776                __tmp.remaining(),
28777            )
28778        }
28779        __tmp.put_u32_le(self.time_boot_ms);
28780        __tmp.put_f32_le(self.x);
28781        __tmp.put_f32_le(self.y);
28782        __tmp.put_f32_le(self.z);
28783        __tmp.put_f32_le(self.vx);
28784        __tmp.put_f32_le(self.vy);
28785        __tmp.put_f32_le(self.vz);
28786        __tmp.put_f32_le(self.afx);
28787        __tmp.put_f32_le(self.afy);
28788        __tmp.put_f32_le(self.afz);
28789        __tmp.put_f32_le(self.yaw);
28790        __tmp.put_f32_le(self.yaw_rate);
28791        __tmp.put_u16_le(self.type_mask.bits());
28792        __tmp.put_u8(self.target_system);
28793        __tmp.put_u8(self.target_component);
28794        __tmp.put_u8(self.coordinate_frame as u8);
28795        if matches!(version, MavlinkVersion::V2) {
28796            let len = __tmp.len();
28797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28798        } else {
28799            __tmp.len()
28800        }
28801    }
28802}
28803#[doc = "Status of simulation environment, if used."]
28804#[doc = ""]
28805#[doc = "ID: 108"]
28806#[derive(Debug, Clone, PartialEq)]
28807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28809#[cfg_attr(feature = "ts", derive(TS))]
28810#[cfg_attr(feature = "ts", ts(export))]
28811pub struct SIM_STATE_DATA {
28812    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28813    pub q1: f32,
28814    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28815    pub q2: f32,
28816    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28817    pub q3: f32,
28818    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28819    pub q4: f32,
28820    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28821    pub roll: f32,
28822    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28823    pub pitch: f32,
28824    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28825    pub yaw: f32,
28826    #[doc = "X acceleration"]
28827    pub xacc: f32,
28828    #[doc = "Y acceleration"]
28829    pub yacc: f32,
28830    #[doc = "Z acceleration"]
28831    pub zacc: f32,
28832    #[doc = "Angular speed around X axis"]
28833    pub xgyro: f32,
28834    #[doc = "Angular speed around Y axis"]
28835    pub ygyro: f32,
28836    #[doc = "Angular speed around Z axis"]
28837    pub zgyro: f32,
28838    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28839    pub lat: f32,
28840    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28841    pub lon: f32,
28842    #[doc = "Altitude"]
28843    pub alt: f32,
28844    #[doc = "Horizontal position standard deviation"]
28845    pub std_dev_horz: f32,
28846    #[doc = "Vertical position standard deviation"]
28847    pub std_dev_vert: f32,
28848    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28849    pub vn: f32,
28850    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28851    pub ve: f32,
28852    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28853    pub vd: f32,
28854    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28856    pub lat_int: i32,
28857    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28859    pub lon_int: i32,
28860}
28861impl SIM_STATE_DATA {
28862    pub const ENCODED_LEN: usize = 92usize;
28863    pub const DEFAULT: Self = Self {
28864        q1: 0.0_f32,
28865        q2: 0.0_f32,
28866        q3: 0.0_f32,
28867        q4: 0.0_f32,
28868        roll: 0.0_f32,
28869        pitch: 0.0_f32,
28870        yaw: 0.0_f32,
28871        xacc: 0.0_f32,
28872        yacc: 0.0_f32,
28873        zacc: 0.0_f32,
28874        xgyro: 0.0_f32,
28875        ygyro: 0.0_f32,
28876        zgyro: 0.0_f32,
28877        lat: 0.0_f32,
28878        lon: 0.0_f32,
28879        alt: 0.0_f32,
28880        std_dev_horz: 0.0_f32,
28881        std_dev_vert: 0.0_f32,
28882        vn: 0.0_f32,
28883        ve: 0.0_f32,
28884        vd: 0.0_f32,
28885        lat_int: 0_i32,
28886        lon_int: 0_i32,
28887    };
28888    #[cfg(feature = "arbitrary")]
28889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28890        use arbitrary::{Arbitrary, Unstructured};
28891        let mut buf = [0u8; 1024];
28892        rng.fill_bytes(&mut buf);
28893        let mut unstructured = Unstructured::new(&buf);
28894        Self::arbitrary(&mut unstructured).unwrap_or_default()
28895    }
28896}
28897impl Default for SIM_STATE_DATA {
28898    fn default() -> Self {
28899        Self::DEFAULT.clone()
28900    }
28901}
28902impl MessageData for SIM_STATE_DATA {
28903    type Message = MavMessage;
28904    const ID: u32 = 108u32;
28905    const NAME: &'static str = "SIM_STATE";
28906    const EXTRA_CRC: u8 = 32u8;
28907    const ENCODED_LEN: usize = 92usize;
28908    fn deser(
28909        _version: MavlinkVersion,
28910        __input: &[u8],
28911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28912        let avail_len = __input.len();
28913        let mut payload_buf = [0; Self::ENCODED_LEN];
28914        let mut buf = if avail_len < Self::ENCODED_LEN {
28915            payload_buf[0..avail_len].copy_from_slice(__input);
28916            Bytes::new(&payload_buf)
28917        } else {
28918            Bytes::new(__input)
28919        };
28920        let mut __struct = Self::default();
28921        __struct.q1 = buf.get_f32_le();
28922        __struct.q2 = buf.get_f32_le();
28923        __struct.q3 = buf.get_f32_le();
28924        __struct.q4 = buf.get_f32_le();
28925        __struct.roll = buf.get_f32_le();
28926        __struct.pitch = buf.get_f32_le();
28927        __struct.yaw = buf.get_f32_le();
28928        __struct.xacc = buf.get_f32_le();
28929        __struct.yacc = buf.get_f32_le();
28930        __struct.zacc = buf.get_f32_le();
28931        __struct.xgyro = buf.get_f32_le();
28932        __struct.ygyro = buf.get_f32_le();
28933        __struct.zgyro = buf.get_f32_le();
28934        __struct.lat = buf.get_f32_le();
28935        __struct.lon = buf.get_f32_le();
28936        __struct.alt = buf.get_f32_le();
28937        __struct.std_dev_horz = buf.get_f32_le();
28938        __struct.std_dev_vert = buf.get_f32_le();
28939        __struct.vn = buf.get_f32_le();
28940        __struct.ve = buf.get_f32_le();
28941        __struct.vd = buf.get_f32_le();
28942        __struct.lat_int = buf.get_i32_le();
28943        __struct.lon_int = buf.get_i32_le();
28944        Ok(__struct)
28945    }
28946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28947        let mut __tmp = BytesMut::new(bytes);
28948        #[allow(clippy::absurd_extreme_comparisons)]
28949        #[allow(unused_comparisons)]
28950        if __tmp.remaining() < Self::ENCODED_LEN {
28951            panic!(
28952                "buffer is too small (need {} bytes, but got {})",
28953                Self::ENCODED_LEN,
28954                __tmp.remaining(),
28955            )
28956        }
28957        __tmp.put_f32_le(self.q1);
28958        __tmp.put_f32_le(self.q2);
28959        __tmp.put_f32_le(self.q3);
28960        __tmp.put_f32_le(self.q4);
28961        __tmp.put_f32_le(self.roll);
28962        __tmp.put_f32_le(self.pitch);
28963        __tmp.put_f32_le(self.yaw);
28964        __tmp.put_f32_le(self.xacc);
28965        __tmp.put_f32_le(self.yacc);
28966        __tmp.put_f32_le(self.zacc);
28967        __tmp.put_f32_le(self.xgyro);
28968        __tmp.put_f32_le(self.ygyro);
28969        __tmp.put_f32_le(self.zgyro);
28970        __tmp.put_f32_le(self.lat);
28971        __tmp.put_f32_le(self.lon);
28972        __tmp.put_f32_le(self.alt);
28973        __tmp.put_f32_le(self.std_dev_horz);
28974        __tmp.put_f32_le(self.std_dev_vert);
28975        __tmp.put_f32_le(self.vn);
28976        __tmp.put_f32_le(self.ve);
28977        __tmp.put_f32_le(self.vd);
28978        if matches!(version, MavlinkVersion::V2) {
28979            __tmp.put_i32_le(self.lat_int);
28980            __tmp.put_i32_le(self.lon_int);
28981            let len = __tmp.len();
28982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28983        } else {
28984            __tmp.len()
28985        }
28986    }
28987}
28988#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28989#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28990#[doc = ""]
28991#[doc = "ID: 370"]
28992#[derive(Debug, Clone, PartialEq)]
28993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28995#[cfg_attr(feature = "ts", derive(TS))]
28996#[cfg_attr(feature = "ts", ts(export))]
28997pub struct SMART_BATTERY_INFO_DATA {
28998    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28999    pub capacity_full_specification: i32,
29000    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29001    pub capacity_full: i32,
29002    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29003    pub cycle_count: u16,
29004    #[doc = "Battery weight. 0: field not provided."]
29005    pub weight: u16,
29006    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29007    pub discharge_minimum_voltage: u16,
29008    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29009    pub charging_minimum_voltage: u16,
29010    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29011    pub resting_minimum_voltage: u16,
29012    #[doc = "Battery ID"]
29013    pub id: u8,
29014    #[doc = "Function of the battery"]
29015    pub battery_function: MavBatteryFunction,
29016    #[doc = "Type (chemistry) of the battery"]
29017    pub mavtype: MavBatteryType,
29018    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29019    #[cfg_attr(feature = "ts", ts(type = "string"))]
29020    pub serial_number: CharArray<16>,
29021    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29022    #[cfg_attr(feature = "ts", ts(type = "string"))]
29023    pub device_name: CharArray<50>,
29024    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29025    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29026    pub charging_maximum_voltage: u16,
29027    #[doc = "Number of battery cells in series. 0: field not provided."]
29028    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29029    pub cells_in_series: u8,
29030    #[doc = "Maximum pack discharge current. 0: field not provided."]
29031    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29032    pub discharge_maximum_current: u32,
29033    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29035    pub discharge_maximum_burst_current: u32,
29036    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29037    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29038    #[cfg_attr(feature = "ts", ts(type = "string"))]
29039    pub manufacture_date: CharArray<11>,
29040}
29041impl SMART_BATTERY_INFO_DATA {
29042    pub const ENCODED_LEN: usize = 109usize;
29043    pub const DEFAULT: Self = Self {
29044        capacity_full_specification: 0_i32,
29045        capacity_full: 0_i32,
29046        cycle_count: 0_u16,
29047        weight: 0_u16,
29048        discharge_minimum_voltage: 0_u16,
29049        charging_minimum_voltage: 0_u16,
29050        resting_minimum_voltage: 0_u16,
29051        id: 0_u8,
29052        battery_function: MavBatteryFunction::DEFAULT,
29053        mavtype: MavBatteryType::DEFAULT,
29054        serial_number: CharArray::new([0_u8; 16usize]),
29055        device_name: CharArray::new([0_u8; 50usize]),
29056        charging_maximum_voltage: 0_u16,
29057        cells_in_series: 0_u8,
29058        discharge_maximum_current: 0_u32,
29059        discharge_maximum_burst_current: 0_u32,
29060        manufacture_date: CharArray::new([0_u8; 11usize]),
29061    };
29062    #[cfg(feature = "arbitrary")]
29063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29064        use arbitrary::{Arbitrary, Unstructured};
29065        let mut buf = [0u8; 1024];
29066        rng.fill_bytes(&mut buf);
29067        let mut unstructured = Unstructured::new(&buf);
29068        Self::arbitrary(&mut unstructured).unwrap_or_default()
29069    }
29070}
29071impl Default for SMART_BATTERY_INFO_DATA {
29072    fn default() -> Self {
29073        Self::DEFAULT.clone()
29074    }
29075}
29076impl MessageData for SMART_BATTERY_INFO_DATA {
29077    type Message = MavMessage;
29078    const ID: u32 = 370u32;
29079    const NAME: &'static str = "SMART_BATTERY_INFO";
29080    const EXTRA_CRC: u8 = 75u8;
29081    const ENCODED_LEN: usize = 109usize;
29082    fn deser(
29083        _version: MavlinkVersion,
29084        __input: &[u8],
29085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29086        let avail_len = __input.len();
29087        let mut payload_buf = [0; Self::ENCODED_LEN];
29088        let mut buf = if avail_len < Self::ENCODED_LEN {
29089            payload_buf[0..avail_len].copy_from_slice(__input);
29090            Bytes::new(&payload_buf)
29091        } else {
29092            Bytes::new(__input)
29093        };
29094        let mut __struct = Self::default();
29095        __struct.capacity_full_specification = buf.get_i32_le();
29096        __struct.capacity_full = buf.get_i32_le();
29097        __struct.cycle_count = buf.get_u16_le();
29098        __struct.weight = buf.get_u16_le();
29099        __struct.discharge_minimum_voltage = buf.get_u16_le();
29100        __struct.charging_minimum_voltage = buf.get_u16_le();
29101        __struct.resting_minimum_voltage = buf.get_u16_le();
29102        __struct.id = buf.get_u8();
29103        let tmp = buf.get_u8();
29104        __struct.battery_function =
29105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29106                enum_type: "MavBatteryFunction",
29107                value: tmp as u32,
29108            })?;
29109        let tmp = buf.get_u8();
29110        __struct.mavtype =
29111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29112                enum_type: "MavBatteryType",
29113                value: tmp as u32,
29114            })?;
29115        let mut tmp = [0_u8; 16usize];
29116        for v in &mut tmp {
29117            *v = buf.get_u8();
29118        }
29119        __struct.serial_number = CharArray::new(tmp);
29120        let mut tmp = [0_u8; 50usize];
29121        for v in &mut tmp {
29122            *v = buf.get_u8();
29123        }
29124        __struct.device_name = CharArray::new(tmp);
29125        __struct.charging_maximum_voltage = buf.get_u16_le();
29126        __struct.cells_in_series = buf.get_u8();
29127        __struct.discharge_maximum_current = buf.get_u32_le();
29128        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29129        let mut tmp = [0_u8; 11usize];
29130        for v in &mut tmp {
29131            *v = buf.get_u8();
29132        }
29133        __struct.manufacture_date = CharArray::new(tmp);
29134        Ok(__struct)
29135    }
29136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29137        let mut __tmp = BytesMut::new(bytes);
29138        #[allow(clippy::absurd_extreme_comparisons)]
29139        #[allow(unused_comparisons)]
29140        if __tmp.remaining() < Self::ENCODED_LEN {
29141            panic!(
29142                "buffer is too small (need {} bytes, but got {})",
29143                Self::ENCODED_LEN,
29144                __tmp.remaining(),
29145            )
29146        }
29147        __tmp.put_i32_le(self.capacity_full_specification);
29148        __tmp.put_i32_le(self.capacity_full);
29149        __tmp.put_u16_le(self.cycle_count);
29150        __tmp.put_u16_le(self.weight);
29151        __tmp.put_u16_le(self.discharge_minimum_voltage);
29152        __tmp.put_u16_le(self.charging_minimum_voltage);
29153        __tmp.put_u16_le(self.resting_minimum_voltage);
29154        __tmp.put_u8(self.id);
29155        __tmp.put_u8(self.battery_function as u8);
29156        __tmp.put_u8(self.mavtype as u8);
29157        for val in &self.serial_number {
29158            __tmp.put_u8(*val);
29159        }
29160        for val in &self.device_name {
29161            __tmp.put_u8(*val);
29162        }
29163        if matches!(version, MavlinkVersion::V2) {
29164            __tmp.put_u16_le(self.charging_maximum_voltage);
29165            __tmp.put_u8(self.cells_in_series);
29166            __tmp.put_u32_le(self.discharge_maximum_current);
29167            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29168            for val in &self.manufacture_date {
29169                __tmp.put_u8(*val);
29170            }
29171            let len = __tmp.len();
29172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29173        } else {
29174            __tmp.len()
29175        }
29176    }
29177}
29178#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29179#[doc = ""]
29180#[doc = "ID: 253"]
29181#[derive(Debug, Clone, PartialEq)]
29182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29184#[cfg_attr(feature = "ts", derive(TS))]
29185#[cfg_attr(feature = "ts", ts(export))]
29186pub struct STATUSTEXT_DATA {
29187    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29188    pub severity: MavSeverity,
29189    #[doc = "Status text message, without null termination character"]
29190    #[cfg_attr(feature = "ts", ts(type = "string"))]
29191    pub text: CharArray<50>,
29192    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29193    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29194    pub id: u16,
29195    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29196    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29197    pub chunk_seq: u8,
29198}
29199impl STATUSTEXT_DATA {
29200    pub const ENCODED_LEN: usize = 54usize;
29201    pub const DEFAULT: Self = Self {
29202        severity: MavSeverity::DEFAULT,
29203        text: CharArray::new([0_u8; 50usize]),
29204        id: 0_u16,
29205        chunk_seq: 0_u8,
29206    };
29207    #[cfg(feature = "arbitrary")]
29208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29209        use arbitrary::{Arbitrary, Unstructured};
29210        let mut buf = [0u8; 1024];
29211        rng.fill_bytes(&mut buf);
29212        let mut unstructured = Unstructured::new(&buf);
29213        Self::arbitrary(&mut unstructured).unwrap_or_default()
29214    }
29215}
29216impl Default for STATUSTEXT_DATA {
29217    fn default() -> Self {
29218        Self::DEFAULT.clone()
29219    }
29220}
29221impl MessageData for STATUSTEXT_DATA {
29222    type Message = MavMessage;
29223    const ID: u32 = 253u32;
29224    const NAME: &'static str = "STATUSTEXT";
29225    const EXTRA_CRC: u8 = 83u8;
29226    const ENCODED_LEN: usize = 54usize;
29227    fn deser(
29228        _version: MavlinkVersion,
29229        __input: &[u8],
29230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29231        let avail_len = __input.len();
29232        let mut payload_buf = [0; Self::ENCODED_LEN];
29233        let mut buf = if avail_len < Self::ENCODED_LEN {
29234            payload_buf[0..avail_len].copy_from_slice(__input);
29235            Bytes::new(&payload_buf)
29236        } else {
29237            Bytes::new(__input)
29238        };
29239        let mut __struct = Self::default();
29240        let tmp = buf.get_u8();
29241        __struct.severity =
29242            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29243                enum_type: "MavSeverity",
29244                value: tmp as u32,
29245            })?;
29246        let mut tmp = [0_u8; 50usize];
29247        for v in &mut tmp {
29248            *v = buf.get_u8();
29249        }
29250        __struct.text = CharArray::new(tmp);
29251        __struct.id = buf.get_u16_le();
29252        __struct.chunk_seq = buf.get_u8();
29253        Ok(__struct)
29254    }
29255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29256        let mut __tmp = BytesMut::new(bytes);
29257        #[allow(clippy::absurd_extreme_comparisons)]
29258        #[allow(unused_comparisons)]
29259        if __tmp.remaining() < Self::ENCODED_LEN {
29260            panic!(
29261                "buffer is too small (need {} bytes, but got {})",
29262                Self::ENCODED_LEN,
29263                __tmp.remaining(),
29264            )
29265        }
29266        __tmp.put_u8(self.severity as u8);
29267        for val in &self.text {
29268            __tmp.put_u8(*val);
29269        }
29270        if matches!(version, MavlinkVersion::V2) {
29271            __tmp.put_u16_le(self.id);
29272            __tmp.put_u8(self.chunk_seq);
29273            let len = __tmp.len();
29274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29275        } else {
29276            __tmp.len()
29277        }
29278    }
29279}
29280#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29281#[doc = ""]
29282#[doc = "ID: 261"]
29283#[derive(Debug, Clone, PartialEq)]
29284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29286#[cfg_attr(feature = "ts", derive(TS))]
29287#[cfg_attr(feature = "ts", ts(export))]
29288pub struct STORAGE_INFORMATION_DATA {
29289    #[doc = "Timestamp (time since system boot)."]
29290    pub time_boot_ms: u32,
29291    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29292    pub total_capacity: f32,
29293    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29294    pub used_capacity: f32,
29295    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29296    pub available_capacity: f32,
29297    #[doc = "Read speed."]
29298    pub read_speed: f32,
29299    #[doc = "Write speed."]
29300    pub write_speed: f32,
29301    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29302    pub storage_id: u8,
29303    #[doc = "Number of storage devices"]
29304    pub storage_count: u8,
29305    #[doc = "Status of storage"]
29306    pub status: StorageStatus,
29307    #[doc = "Type of storage"]
29308    #[cfg_attr(feature = "serde", serde(default))]
29309    pub mavtype: StorageType,
29310    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29312    #[cfg_attr(feature = "ts", ts(type = "string"))]
29313    pub name: CharArray<32>,
29314    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29315    #[cfg_attr(feature = "serde", serde(default))]
29316    pub storage_usage: StorageUsageFlag,
29317}
29318impl STORAGE_INFORMATION_DATA {
29319    pub const ENCODED_LEN: usize = 61usize;
29320    pub const DEFAULT: Self = Self {
29321        time_boot_ms: 0_u32,
29322        total_capacity: 0.0_f32,
29323        used_capacity: 0.0_f32,
29324        available_capacity: 0.0_f32,
29325        read_speed: 0.0_f32,
29326        write_speed: 0.0_f32,
29327        storage_id: 0_u8,
29328        storage_count: 0_u8,
29329        status: StorageStatus::DEFAULT,
29330        mavtype: StorageType::DEFAULT,
29331        name: CharArray::new([0_u8; 32usize]),
29332        storage_usage: StorageUsageFlag::DEFAULT,
29333    };
29334    #[cfg(feature = "arbitrary")]
29335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29336        use arbitrary::{Arbitrary, Unstructured};
29337        let mut buf = [0u8; 1024];
29338        rng.fill_bytes(&mut buf);
29339        let mut unstructured = Unstructured::new(&buf);
29340        Self::arbitrary(&mut unstructured).unwrap_or_default()
29341    }
29342}
29343impl Default for STORAGE_INFORMATION_DATA {
29344    fn default() -> Self {
29345        Self::DEFAULT.clone()
29346    }
29347}
29348impl MessageData for STORAGE_INFORMATION_DATA {
29349    type Message = MavMessage;
29350    const ID: u32 = 261u32;
29351    const NAME: &'static str = "STORAGE_INFORMATION";
29352    const EXTRA_CRC: u8 = 179u8;
29353    const ENCODED_LEN: usize = 61usize;
29354    fn deser(
29355        _version: MavlinkVersion,
29356        __input: &[u8],
29357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29358        let avail_len = __input.len();
29359        let mut payload_buf = [0; Self::ENCODED_LEN];
29360        let mut buf = if avail_len < Self::ENCODED_LEN {
29361            payload_buf[0..avail_len].copy_from_slice(__input);
29362            Bytes::new(&payload_buf)
29363        } else {
29364            Bytes::new(__input)
29365        };
29366        let mut __struct = Self::default();
29367        __struct.time_boot_ms = buf.get_u32_le();
29368        __struct.total_capacity = buf.get_f32_le();
29369        __struct.used_capacity = buf.get_f32_le();
29370        __struct.available_capacity = buf.get_f32_le();
29371        __struct.read_speed = buf.get_f32_le();
29372        __struct.write_speed = buf.get_f32_le();
29373        __struct.storage_id = buf.get_u8();
29374        __struct.storage_count = buf.get_u8();
29375        let tmp = buf.get_u8();
29376        __struct.status =
29377            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29378                enum_type: "StorageStatus",
29379                value: tmp as u32,
29380            })?;
29381        let tmp = buf.get_u8();
29382        __struct.mavtype =
29383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29384                enum_type: "StorageType",
29385                value: tmp as u32,
29386            })?;
29387        let mut tmp = [0_u8; 32usize];
29388        for v in &mut tmp {
29389            *v = buf.get_u8();
29390        }
29391        __struct.name = CharArray::new(tmp);
29392        let tmp = buf.get_u8();
29393        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29394            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29395                flag_type: "StorageUsageFlag",
29396                value: tmp as u32,
29397            })?;
29398        Ok(__struct)
29399    }
29400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29401        let mut __tmp = BytesMut::new(bytes);
29402        #[allow(clippy::absurd_extreme_comparisons)]
29403        #[allow(unused_comparisons)]
29404        if __tmp.remaining() < Self::ENCODED_LEN {
29405            panic!(
29406                "buffer is too small (need {} bytes, but got {})",
29407                Self::ENCODED_LEN,
29408                __tmp.remaining(),
29409            )
29410        }
29411        __tmp.put_u32_le(self.time_boot_ms);
29412        __tmp.put_f32_le(self.total_capacity);
29413        __tmp.put_f32_le(self.used_capacity);
29414        __tmp.put_f32_le(self.available_capacity);
29415        __tmp.put_f32_le(self.read_speed);
29416        __tmp.put_f32_le(self.write_speed);
29417        __tmp.put_u8(self.storage_id);
29418        __tmp.put_u8(self.storage_count);
29419        __tmp.put_u8(self.status as u8);
29420        if matches!(version, MavlinkVersion::V2) {
29421            __tmp.put_u8(self.mavtype as u8);
29422            for val in &self.name {
29423                __tmp.put_u8(*val);
29424            }
29425            __tmp.put_u8(self.storage_usage.bits());
29426            let len = __tmp.len();
29427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29428        } else {
29429            __tmp.len()
29430        }
29431    }
29432}
29433#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29434#[doc = ""]
29435#[doc = "ID: 401"]
29436#[derive(Debug, Clone, PartialEq)]
29437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29439#[cfg_attr(feature = "ts", derive(TS))]
29440#[cfg_attr(feature = "ts", ts(export))]
29441pub struct SUPPORTED_TUNES_DATA {
29442    #[doc = "Bitfield of supported tune formats."]
29443    pub format: TuneFormat,
29444    #[doc = "System ID"]
29445    pub target_system: u8,
29446    #[doc = "Component ID"]
29447    pub target_component: u8,
29448}
29449impl SUPPORTED_TUNES_DATA {
29450    pub const ENCODED_LEN: usize = 6usize;
29451    pub const DEFAULT: Self = Self {
29452        format: TuneFormat::DEFAULT,
29453        target_system: 0_u8,
29454        target_component: 0_u8,
29455    };
29456    #[cfg(feature = "arbitrary")]
29457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29458        use arbitrary::{Arbitrary, Unstructured};
29459        let mut buf = [0u8; 1024];
29460        rng.fill_bytes(&mut buf);
29461        let mut unstructured = Unstructured::new(&buf);
29462        Self::arbitrary(&mut unstructured).unwrap_or_default()
29463    }
29464}
29465impl Default for SUPPORTED_TUNES_DATA {
29466    fn default() -> Self {
29467        Self::DEFAULT.clone()
29468    }
29469}
29470impl MessageData for SUPPORTED_TUNES_DATA {
29471    type Message = MavMessage;
29472    const ID: u32 = 401u32;
29473    const NAME: &'static str = "SUPPORTED_TUNES";
29474    const EXTRA_CRC: u8 = 183u8;
29475    const ENCODED_LEN: usize = 6usize;
29476    fn deser(
29477        _version: MavlinkVersion,
29478        __input: &[u8],
29479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29480        let avail_len = __input.len();
29481        let mut payload_buf = [0; Self::ENCODED_LEN];
29482        let mut buf = if avail_len < Self::ENCODED_LEN {
29483            payload_buf[0..avail_len].copy_from_slice(__input);
29484            Bytes::new(&payload_buf)
29485        } else {
29486            Bytes::new(__input)
29487        };
29488        let mut __struct = Self::default();
29489        let tmp = buf.get_u32_le();
29490        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29491            ::mavlink_core::error::ParserError::InvalidEnum {
29492                enum_type: "TuneFormat",
29493                value: tmp as u32,
29494            },
29495        )?;
29496        __struct.target_system = buf.get_u8();
29497        __struct.target_component = buf.get_u8();
29498        Ok(__struct)
29499    }
29500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29501        let mut __tmp = BytesMut::new(bytes);
29502        #[allow(clippy::absurd_extreme_comparisons)]
29503        #[allow(unused_comparisons)]
29504        if __tmp.remaining() < Self::ENCODED_LEN {
29505            panic!(
29506                "buffer is too small (need {} bytes, but got {})",
29507                Self::ENCODED_LEN,
29508                __tmp.remaining(),
29509            )
29510        }
29511        __tmp.put_u32_le(self.format as u32);
29512        __tmp.put_u8(self.target_system);
29513        __tmp.put_u8(self.target_component);
29514        if matches!(version, MavlinkVersion::V2) {
29515            let len = __tmp.len();
29516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29517        } else {
29518            __tmp.len()
29519        }
29520    }
29521}
29522#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29523#[doc = ""]
29524#[doc = "ID: 2"]
29525#[derive(Debug, Clone, PartialEq)]
29526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29528#[cfg_attr(feature = "ts", derive(TS))]
29529#[cfg_attr(feature = "ts", ts(export))]
29530pub struct SYSTEM_TIME_DATA {
29531    #[doc = "Timestamp (UNIX epoch time)."]
29532    pub time_unix_usec: u64,
29533    #[doc = "Timestamp (time since system boot)."]
29534    pub time_boot_ms: u32,
29535}
29536impl SYSTEM_TIME_DATA {
29537    pub const ENCODED_LEN: usize = 12usize;
29538    pub const DEFAULT: Self = Self {
29539        time_unix_usec: 0_u64,
29540        time_boot_ms: 0_u32,
29541    };
29542    #[cfg(feature = "arbitrary")]
29543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29544        use arbitrary::{Arbitrary, Unstructured};
29545        let mut buf = [0u8; 1024];
29546        rng.fill_bytes(&mut buf);
29547        let mut unstructured = Unstructured::new(&buf);
29548        Self::arbitrary(&mut unstructured).unwrap_or_default()
29549    }
29550}
29551impl Default for SYSTEM_TIME_DATA {
29552    fn default() -> Self {
29553        Self::DEFAULT.clone()
29554    }
29555}
29556impl MessageData for SYSTEM_TIME_DATA {
29557    type Message = MavMessage;
29558    const ID: u32 = 2u32;
29559    const NAME: &'static str = "SYSTEM_TIME";
29560    const EXTRA_CRC: u8 = 137u8;
29561    const ENCODED_LEN: usize = 12usize;
29562    fn deser(
29563        _version: MavlinkVersion,
29564        __input: &[u8],
29565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29566        let avail_len = __input.len();
29567        let mut payload_buf = [0; Self::ENCODED_LEN];
29568        let mut buf = if avail_len < Self::ENCODED_LEN {
29569            payload_buf[0..avail_len].copy_from_slice(__input);
29570            Bytes::new(&payload_buf)
29571        } else {
29572            Bytes::new(__input)
29573        };
29574        let mut __struct = Self::default();
29575        __struct.time_unix_usec = buf.get_u64_le();
29576        __struct.time_boot_ms = buf.get_u32_le();
29577        Ok(__struct)
29578    }
29579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29580        let mut __tmp = BytesMut::new(bytes);
29581        #[allow(clippy::absurd_extreme_comparisons)]
29582        #[allow(unused_comparisons)]
29583        if __tmp.remaining() < Self::ENCODED_LEN {
29584            panic!(
29585                "buffer is too small (need {} bytes, but got {})",
29586                Self::ENCODED_LEN,
29587                __tmp.remaining(),
29588            )
29589        }
29590        __tmp.put_u64_le(self.time_unix_usec);
29591        __tmp.put_u32_le(self.time_boot_ms);
29592        if matches!(version, MavlinkVersion::V2) {
29593            let len = __tmp.len();
29594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29595        } else {
29596            __tmp.len()
29597        }
29598    }
29599}
29600#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29601#[doc = ""]
29602#[doc = "ID: 1"]
29603#[derive(Debug, Clone, PartialEq)]
29604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29606#[cfg_attr(feature = "ts", derive(TS))]
29607#[cfg_attr(feature = "ts", ts(export))]
29608pub struct SYS_STATUS_DATA {
29609    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29610    pub onboard_control_sensors_present: MavSysStatusSensor,
29611    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29612    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29613    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29614    pub onboard_control_sensors_health: MavSysStatusSensor,
29615    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29616    pub load: u16,
29617    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29618    pub voltage_battery: u16,
29619    #[doc = "Battery current, -1: Current not sent by autopilot"]
29620    pub current_battery: i16,
29621    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29622    pub drop_rate_comm: u16,
29623    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29624    pub errors_comm: u16,
29625    #[doc = "Autopilot-specific errors"]
29626    pub errors_count1: u16,
29627    #[doc = "Autopilot-specific errors"]
29628    pub errors_count2: u16,
29629    #[doc = "Autopilot-specific errors"]
29630    pub errors_count3: u16,
29631    #[doc = "Autopilot-specific errors"]
29632    pub errors_count4: u16,
29633    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29634    pub battery_remaining: i8,
29635    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29636    #[cfg_attr(feature = "serde", serde(default))]
29637    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29638    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29639    #[cfg_attr(feature = "serde", serde(default))]
29640    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29641    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29642    #[cfg_attr(feature = "serde", serde(default))]
29643    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29644}
29645impl SYS_STATUS_DATA {
29646    pub const ENCODED_LEN: usize = 43usize;
29647    pub const DEFAULT: Self = Self {
29648        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29649        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29650        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29651        load: 0_u16,
29652        voltage_battery: 0_u16,
29653        current_battery: 0_i16,
29654        drop_rate_comm: 0_u16,
29655        errors_comm: 0_u16,
29656        errors_count1: 0_u16,
29657        errors_count2: 0_u16,
29658        errors_count3: 0_u16,
29659        errors_count4: 0_u16,
29660        battery_remaining: 0_i8,
29661        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29662        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29663        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29664    };
29665    #[cfg(feature = "arbitrary")]
29666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29667        use arbitrary::{Arbitrary, Unstructured};
29668        let mut buf = [0u8; 1024];
29669        rng.fill_bytes(&mut buf);
29670        let mut unstructured = Unstructured::new(&buf);
29671        Self::arbitrary(&mut unstructured).unwrap_or_default()
29672    }
29673}
29674impl Default for SYS_STATUS_DATA {
29675    fn default() -> Self {
29676        Self::DEFAULT.clone()
29677    }
29678}
29679impl MessageData for SYS_STATUS_DATA {
29680    type Message = MavMessage;
29681    const ID: u32 = 1u32;
29682    const NAME: &'static str = "SYS_STATUS";
29683    const EXTRA_CRC: u8 = 124u8;
29684    const ENCODED_LEN: usize = 43usize;
29685    fn deser(
29686        _version: MavlinkVersion,
29687        __input: &[u8],
29688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29689        let avail_len = __input.len();
29690        let mut payload_buf = [0; Self::ENCODED_LEN];
29691        let mut buf = if avail_len < Self::ENCODED_LEN {
29692            payload_buf[0..avail_len].copy_from_slice(__input);
29693            Bytes::new(&payload_buf)
29694        } else {
29695            Bytes::new(__input)
29696        };
29697        let mut __struct = Self::default();
29698        let tmp = buf.get_u32_le();
29699        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29700            tmp & MavSysStatusSensor::all().bits(),
29701        )
29702        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29703            flag_type: "MavSysStatusSensor",
29704            value: tmp as u32,
29705        })?;
29706        let tmp = buf.get_u32_le();
29707        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29708            tmp & MavSysStatusSensor::all().bits(),
29709        )
29710        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29711            flag_type: "MavSysStatusSensor",
29712            value: tmp as u32,
29713        })?;
29714        let tmp = buf.get_u32_le();
29715        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29716            tmp & MavSysStatusSensor::all().bits(),
29717        )
29718        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29719            flag_type: "MavSysStatusSensor",
29720            value: tmp as u32,
29721        })?;
29722        __struct.load = buf.get_u16_le();
29723        __struct.voltage_battery = buf.get_u16_le();
29724        __struct.current_battery = buf.get_i16_le();
29725        __struct.drop_rate_comm = buf.get_u16_le();
29726        __struct.errors_comm = buf.get_u16_le();
29727        __struct.errors_count1 = buf.get_u16_le();
29728        __struct.errors_count2 = buf.get_u16_le();
29729        __struct.errors_count3 = buf.get_u16_le();
29730        __struct.errors_count4 = buf.get_u16_le();
29731        __struct.battery_remaining = buf.get_i8();
29732        let tmp = buf.get_u32_le();
29733        __struct.onboard_control_sensors_present_extended =
29734            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29735                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29736                flag_type: "MavSysStatusSensorExtended",
29737                value: tmp as u32,
29738            })?;
29739        let tmp = buf.get_u32_le();
29740        __struct.onboard_control_sensors_enabled_extended =
29741            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29742                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29743                flag_type: "MavSysStatusSensorExtended",
29744                value: tmp as u32,
29745            })?;
29746        let tmp = buf.get_u32_le();
29747        __struct.onboard_control_sensors_health_extended =
29748            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29749                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29750                flag_type: "MavSysStatusSensorExtended",
29751                value: tmp as u32,
29752            })?;
29753        Ok(__struct)
29754    }
29755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29756        let mut __tmp = BytesMut::new(bytes);
29757        #[allow(clippy::absurd_extreme_comparisons)]
29758        #[allow(unused_comparisons)]
29759        if __tmp.remaining() < Self::ENCODED_LEN {
29760            panic!(
29761                "buffer is too small (need {} bytes, but got {})",
29762                Self::ENCODED_LEN,
29763                __tmp.remaining(),
29764            )
29765        }
29766        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29767        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29768        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29769        __tmp.put_u16_le(self.load);
29770        __tmp.put_u16_le(self.voltage_battery);
29771        __tmp.put_i16_le(self.current_battery);
29772        __tmp.put_u16_le(self.drop_rate_comm);
29773        __tmp.put_u16_le(self.errors_comm);
29774        __tmp.put_u16_le(self.errors_count1);
29775        __tmp.put_u16_le(self.errors_count2);
29776        __tmp.put_u16_le(self.errors_count3);
29777        __tmp.put_u16_le(self.errors_count4);
29778        __tmp.put_i8(self.battery_remaining);
29779        if matches!(version, MavlinkVersion::V2) {
29780            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29781            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29782            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29783            let len = __tmp.len();
29784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29785        } else {
29786            __tmp.len()
29787        }
29788    }
29789}
29790#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29791#[doc = ""]
29792#[doc = "ID: 135"]
29793#[derive(Debug, Clone, PartialEq)]
29794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29796#[cfg_attr(feature = "ts", derive(TS))]
29797#[cfg_attr(feature = "ts", ts(export))]
29798pub struct TERRAIN_CHECK_DATA {
29799    #[doc = "Latitude"]
29800    pub lat: i32,
29801    #[doc = "Longitude"]
29802    pub lon: i32,
29803}
29804impl TERRAIN_CHECK_DATA {
29805    pub const ENCODED_LEN: usize = 8usize;
29806    pub const DEFAULT: Self = Self {
29807        lat: 0_i32,
29808        lon: 0_i32,
29809    };
29810    #[cfg(feature = "arbitrary")]
29811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29812        use arbitrary::{Arbitrary, Unstructured};
29813        let mut buf = [0u8; 1024];
29814        rng.fill_bytes(&mut buf);
29815        let mut unstructured = Unstructured::new(&buf);
29816        Self::arbitrary(&mut unstructured).unwrap_or_default()
29817    }
29818}
29819impl Default for TERRAIN_CHECK_DATA {
29820    fn default() -> Self {
29821        Self::DEFAULT.clone()
29822    }
29823}
29824impl MessageData for TERRAIN_CHECK_DATA {
29825    type Message = MavMessage;
29826    const ID: u32 = 135u32;
29827    const NAME: &'static str = "TERRAIN_CHECK";
29828    const EXTRA_CRC: u8 = 203u8;
29829    const ENCODED_LEN: usize = 8usize;
29830    fn deser(
29831        _version: MavlinkVersion,
29832        __input: &[u8],
29833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29834        let avail_len = __input.len();
29835        let mut payload_buf = [0; Self::ENCODED_LEN];
29836        let mut buf = if avail_len < Self::ENCODED_LEN {
29837            payload_buf[0..avail_len].copy_from_slice(__input);
29838            Bytes::new(&payload_buf)
29839        } else {
29840            Bytes::new(__input)
29841        };
29842        let mut __struct = Self::default();
29843        __struct.lat = buf.get_i32_le();
29844        __struct.lon = buf.get_i32_le();
29845        Ok(__struct)
29846    }
29847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29848        let mut __tmp = BytesMut::new(bytes);
29849        #[allow(clippy::absurd_extreme_comparisons)]
29850        #[allow(unused_comparisons)]
29851        if __tmp.remaining() < Self::ENCODED_LEN {
29852            panic!(
29853                "buffer is too small (need {} bytes, but got {})",
29854                Self::ENCODED_LEN,
29855                __tmp.remaining(),
29856            )
29857        }
29858        __tmp.put_i32_le(self.lat);
29859        __tmp.put_i32_le(self.lon);
29860        if matches!(version, MavlinkVersion::V2) {
29861            let len = __tmp.len();
29862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29863        } else {
29864            __tmp.len()
29865        }
29866    }
29867}
29868#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29869#[doc = ""]
29870#[doc = "ID: 134"]
29871#[derive(Debug, Clone, PartialEq)]
29872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29874#[cfg_attr(feature = "ts", derive(TS))]
29875#[cfg_attr(feature = "ts", ts(export))]
29876pub struct TERRAIN_DATA_DATA {
29877    #[doc = "Latitude of SW corner of first grid"]
29878    pub lat: i32,
29879    #[doc = "Longitude of SW corner of first grid"]
29880    pub lon: i32,
29881    #[doc = "Grid spacing"]
29882    pub grid_spacing: u16,
29883    #[doc = "Terrain data MSL"]
29884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29885    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29886    pub data: [i16; 16],
29887    #[doc = "bit within the terrain request mask"]
29888    pub gridbit: u8,
29889}
29890impl TERRAIN_DATA_DATA {
29891    pub const ENCODED_LEN: usize = 43usize;
29892    pub const DEFAULT: Self = Self {
29893        lat: 0_i32,
29894        lon: 0_i32,
29895        grid_spacing: 0_u16,
29896        data: [0_i16; 16usize],
29897        gridbit: 0_u8,
29898    };
29899    #[cfg(feature = "arbitrary")]
29900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29901        use arbitrary::{Arbitrary, Unstructured};
29902        let mut buf = [0u8; 1024];
29903        rng.fill_bytes(&mut buf);
29904        let mut unstructured = Unstructured::new(&buf);
29905        Self::arbitrary(&mut unstructured).unwrap_or_default()
29906    }
29907}
29908impl Default for TERRAIN_DATA_DATA {
29909    fn default() -> Self {
29910        Self::DEFAULT.clone()
29911    }
29912}
29913impl MessageData for TERRAIN_DATA_DATA {
29914    type Message = MavMessage;
29915    const ID: u32 = 134u32;
29916    const NAME: &'static str = "TERRAIN_DATA";
29917    const EXTRA_CRC: u8 = 229u8;
29918    const ENCODED_LEN: usize = 43usize;
29919    fn deser(
29920        _version: MavlinkVersion,
29921        __input: &[u8],
29922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29923        let avail_len = __input.len();
29924        let mut payload_buf = [0; Self::ENCODED_LEN];
29925        let mut buf = if avail_len < Self::ENCODED_LEN {
29926            payload_buf[0..avail_len].copy_from_slice(__input);
29927            Bytes::new(&payload_buf)
29928        } else {
29929            Bytes::new(__input)
29930        };
29931        let mut __struct = Self::default();
29932        __struct.lat = buf.get_i32_le();
29933        __struct.lon = buf.get_i32_le();
29934        __struct.grid_spacing = buf.get_u16_le();
29935        for v in &mut __struct.data {
29936            let val = buf.get_i16_le();
29937            *v = val;
29938        }
29939        __struct.gridbit = buf.get_u8();
29940        Ok(__struct)
29941    }
29942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29943        let mut __tmp = BytesMut::new(bytes);
29944        #[allow(clippy::absurd_extreme_comparisons)]
29945        #[allow(unused_comparisons)]
29946        if __tmp.remaining() < Self::ENCODED_LEN {
29947            panic!(
29948                "buffer is too small (need {} bytes, but got {})",
29949                Self::ENCODED_LEN,
29950                __tmp.remaining(),
29951            )
29952        }
29953        __tmp.put_i32_le(self.lat);
29954        __tmp.put_i32_le(self.lon);
29955        __tmp.put_u16_le(self.grid_spacing);
29956        for val in &self.data {
29957            __tmp.put_i16_le(*val);
29958        }
29959        __tmp.put_u8(self.gridbit);
29960        if matches!(version, MavlinkVersion::V2) {
29961            let len = __tmp.len();
29962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29963        } else {
29964            __tmp.len()
29965        }
29966    }
29967}
29968#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29969#[doc = ""]
29970#[doc = "ID: 136"]
29971#[derive(Debug, Clone, PartialEq)]
29972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29974#[cfg_attr(feature = "ts", derive(TS))]
29975#[cfg_attr(feature = "ts", ts(export))]
29976pub struct TERRAIN_REPORT_DATA {
29977    #[doc = "Latitude"]
29978    pub lat: i32,
29979    #[doc = "Longitude"]
29980    pub lon: i32,
29981    #[doc = "Terrain height MSL"]
29982    pub terrain_height: f32,
29983    #[doc = "Current vehicle height above lat/lon terrain height"]
29984    pub current_height: f32,
29985    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29986    pub spacing: u16,
29987    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29988    pub pending: u16,
29989    #[doc = "Number of 4x4 terrain blocks in memory"]
29990    pub loaded: u16,
29991}
29992impl TERRAIN_REPORT_DATA {
29993    pub const ENCODED_LEN: usize = 22usize;
29994    pub const DEFAULT: Self = Self {
29995        lat: 0_i32,
29996        lon: 0_i32,
29997        terrain_height: 0.0_f32,
29998        current_height: 0.0_f32,
29999        spacing: 0_u16,
30000        pending: 0_u16,
30001        loaded: 0_u16,
30002    };
30003    #[cfg(feature = "arbitrary")]
30004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30005        use arbitrary::{Arbitrary, Unstructured};
30006        let mut buf = [0u8; 1024];
30007        rng.fill_bytes(&mut buf);
30008        let mut unstructured = Unstructured::new(&buf);
30009        Self::arbitrary(&mut unstructured).unwrap_or_default()
30010    }
30011}
30012impl Default for TERRAIN_REPORT_DATA {
30013    fn default() -> Self {
30014        Self::DEFAULT.clone()
30015    }
30016}
30017impl MessageData for TERRAIN_REPORT_DATA {
30018    type Message = MavMessage;
30019    const ID: u32 = 136u32;
30020    const NAME: &'static str = "TERRAIN_REPORT";
30021    const EXTRA_CRC: u8 = 1u8;
30022    const ENCODED_LEN: usize = 22usize;
30023    fn deser(
30024        _version: MavlinkVersion,
30025        __input: &[u8],
30026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30027        let avail_len = __input.len();
30028        let mut payload_buf = [0; Self::ENCODED_LEN];
30029        let mut buf = if avail_len < Self::ENCODED_LEN {
30030            payload_buf[0..avail_len].copy_from_slice(__input);
30031            Bytes::new(&payload_buf)
30032        } else {
30033            Bytes::new(__input)
30034        };
30035        let mut __struct = Self::default();
30036        __struct.lat = buf.get_i32_le();
30037        __struct.lon = buf.get_i32_le();
30038        __struct.terrain_height = buf.get_f32_le();
30039        __struct.current_height = buf.get_f32_le();
30040        __struct.spacing = buf.get_u16_le();
30041        __struct.pending = buf.get_u16_le();
30042        __struct.loaded = buf.get_u16_le();
30043        Ok(__struct)
30044    }
30045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30046        let mut __tmp = BytesMut::new(bytes);
30047        #[allow(clippy::absurd_extreme_comparisons)]
30048        #[allow(unused_comparisons)]
30049        if __tmp.remaining() < Self::ENCODED_LEN {
30050            panic!(
30051                "buffer is too small (need {} bytes, but got {})",
30052                Self::ENCODED_LEN,
30053                __tmp.remaining(),
30054            )
30055        }
30056        __tmp.put_i32_le(self.lat);
30057        __tmp.put_i32_le(self.lon);
30058        __tmp.put_f32_le(self.terrain_height);
30059        __tmp.put_f32_le(self.current_height);
30060        __tmp.put_u16_le(self.spacing);
30061        __tmp.put_u16_le(self.pending);
30062        __tmp.put_u16_le(self.loaded);
30063        if matches!(version, MavlinkVersion::V2) {
30064            let len = __tmp.len();
30065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30066        } else {
30067            __tmp.len()
30068        }
30069    }
30070}
30071#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30072#[doc = ""]
30073#[doc = "ID: 133"]
30074#[derive(Debug, Clone, PartialEq)]
30075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30077#[cfg_attr(feature = "ts", derive(TS))]
30078#[cfg_attr(feature = "ts", ts(export))]
30079pub struct TERRAIN_REQUEST_DATA {
30080    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30081    pub mask: u64,
30082    #[doc = "Latitude of SW corner of first grid"]
30083    pub lat: i32,
30084    #[doc = "Longitude of SW corner of first grid"]
30085    pub lon: i32,
30086    #[doc = "Grid spacing"]
30087    pub grid_spacing: u16,
30088}
30089impl TERRAIN_REQUEST_DATA {
30090    pub const ENCODED_LEN: usize = 18usize;
30091    pub const DEFAULT: Self = Self {
30092        mask: 0_u64,
30093        lat: 0_i32,
30094        lon: 0_i32,
30095        grid_spacing: 0_u16,
30096    };
30097    #[cfg(feature = "arbitrary")]
30098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30099        use arbitrary::{Arbitrary, Unstructured};
30100        let mut buf = [0u8; 1024];
30101        rng.fill_bytes(&mut buf);
30102        let mut unstructured = Unstructured::new(&buf);
30103        Self::arbitrary(&mut unstructured).unwrap_or_default()
30104    }
30105}
30106impl Default for TERRAIN_REQUEST_DATA {
30107    fn default() -> Self {
30108        Self::DEFAULT.clone()
30109    }
30110}
30111impl MessageData for TERRAIN_REQUEST_DATA {
30112    type Message = MavMessage;
30113    const ID: u32 = 133u32;
30114    const NAME: &'static str = "TERRAIN_REQUEST";
30115    const EXTRA_CRC: u8 = 6u8;
30116    const ENCODED_LEN: usize = 18usize;
30117    fn deser(
30118        _version: MavlinkVersion,
30119        __input: &[u8],
30120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30121        let avail_len = __input.len();
30122        let mut payload_buf = [0; Self::ENCODED_LEN];
30123        let mut buf = if avail_len < Self::ENCODED_LEN {
30124            payload_buf[0..avail_len].copy_from_slice(__input);
30125            Bytes::new(&payload_buf)
30126        } else {
30127            Bytes::new(__input)
30128        };
30129        let mut __struct = Self::default();
30130        __struct.mask = buf.get_u64_le();
30131        __struct.lat = buf.get_i32_le();
30132        __struct.lon = buf.get_i32_le();
30133        __struct.grid_spacing = buf.get_u16_le();
30134        Ok(__struct)
30135    }
30136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30137        let mut __tmp = BytesMut::new(bytes);
30138        #[allow(clippy::absurd_extreme_comparisons)]
30139        #[allow(unused_comparisons)]
30140        if __tmp.remaining() < Self::ENCODED_LEN {
30141            panic!(
30142                "buffer is too small (need {} bytes, but got {})",
30143                Self::ENCODED_LEN,
30144                __tmp.remaining(),
30145            )
30146        }
30147        __tmp.put_u64_le(self.mask);
30148        __tmp.put_i32_le(self.lat);
30149        __tmp.put_i32_le(self.lon);
30150        __tmp.put_u16_le(self.grid_spacing);
30151        if matches!(version, MavlinkVersion::V2) {
30152            let len = __tmp.len();
30153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30154        } else {
30155            __tmp.len()
30156        }
30157    }
30158}
30159#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30160#[doc = ""]
30161#[doc = "ID: 111"]
30162#[derive(Debug, Clone, PartialEq)]
30163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30165#[cfg_attr(feature = "ts", derive(TS))]
30166#[cfg_attr(feature = "ts", ts(export))]
30167pub struct TIMESYNC_DATA {
30168    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30169    pub tc1: i64,
30170    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30171    pub ts1: i64,
30172    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30174    pub target_system: u8,
30175    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30177    pub target_component: u8,
30178}
30179impl TIMESYNC_DATA {
30180    pub const ENCODED_LEN: usize = 18usize;
30181    pub const DEFAULT: Self = Self {
30182        tc1: 0_i64,
30183        ts1: 0_i64,
30184        target_system: 0_u8,
30185        target_component: 0_u8,
30186    };
30187    #[cfg(feature = "arbitrary")]
30188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30189        use arbitrary::{Arbitrary, Unstructured};
30190        let mut buf = [0u8; 1024];
30191        rng.fill_bytes(&mut buf);
30192        let mut unstructured = Unstructured::new(&buf);
30193        Self::arbitrary(&mut unstructured).unwrap_or_default()
30194    }
30195}
30196impl Default for TIMESYNC_DATA {
30197    fn default() -> Self {
30198        Self::DEFAULT.clone()
30199    }
30200}
30201impl MessageData for TIMESYNC_DATA {
30202    type Message = MavMessage;
30203    const ID: u32 = 111u32;
30204    const NAME: &'static str = "TIMESYNC";
30205    const EXTRA_CRC: u8 = 34u8;
30206    const ENCODED_LEN: usize = 18usize;
30207    fn deser(
30208        _version: MavlinkVersion,
30209        __input: &[u8],
30210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30211        let avail_len = __input.len();
30212        let mut payload_buf = [0; Self::ENCODED_LEN];
30213        let mut buf = if avail_len < Self::ENCODED_LEN {
30214            payload_buf[0..avail_len].copy_from_slice(__input);
30215            Bytes::new(&payload_buf)
30216        } else {
30217            Bytes::new(__input)
30218        };
30219        let mut __struct = Self::default();
30220        __struct.tc1 = buf.get_i64_le();
30221        __struct.ts1 = buf.get_i64_le();
30222        __struct.target_system = buf.get_u8();
30223        __struct.target_component = buf.get_u8();
30224        Ok(__struct)
30225    }
30226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30227        let mut __tmp = BytesMut::new(bytes);
30228        #[allow(clippy::absurd_extreme_comparisons)]
30229        #[allow(unused_comparisons)]
30230        if __tmp.remaining() < Self::ENCODED_LEN {
30231            panic!(
30232                "buffer is too small (need {} bytes, but got {})",
30233                Self::ENCODED_LEN,
30234                __tmp.remaining(),
30235            )
30236        }
30237        __tmp.put_i64_le(self.tc1);
30238        __tmp.put_i64_le(self.ts1);
30239        if matches!(version, MavlinkVersion::V2) {
30240            __tmp.put_u8(self.target_system);
30241            __tmp.put_u8(self.target_component);
30242            let len = __tmp.len();
30243            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30244        } else {
30245            __tmp.len()
30246        }
30247    }
30248}
30249#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30250#[doc = ""]
30251#[doc = "ID: 380"]
30252#[derive(Debug, Clone, PartialEq)]
30253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30255#[cfg_attr(feature = "ts", derive(TS))]
30256#[cfg_attr(feature = "ts", ts(export))]
30257pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30258    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30259    pub safe_return: i32,
30260    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30261    pub land: i32,
30262    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30263    pub mission_next_item: i32,
30264    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30265    pub mission_end: i32,
30266    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30267    pub commanded_action: i32,
30268}
30269impl TIME_ESTIMATE_TO_TARGET_DATA {
30270    pub const ENCODED_LEN: usize = 20usize;
30271    pub const DEFAULT: Self = Self {
30272        safe_return: 0_i32,
30273        land: 0_i32,
30274        mission_next_item: 0_i32,
30275        mission_end: 0_i32,
30276        commanded_action: 0_i32,
30277    };
30278    #[cfg(feature = "arbitrary")]
30279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30280        use arbitrary::{Arbitrary, Unstructured};
30281        let mut buf = [0u8; 1024];
30282        rng.fill_bytes(&mut buf);
30283        let mut unstructured = Unstructured::new(&buf);
30284        Self::arbitrary(&mut unstructured).unwrap_or_default()
30285    }
30286}
30287impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30288    fn default() -> Self {
30289        Self::DEFAULT.clone()
30290    }
30291}
30292impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30293    type Message = MavMessage;
30294    const ID: u32 = 380u32;
30295    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30296    const EXTRA_CRC: u8 = 232u8;
30297    const ENCODED_LEN: usize = 20usize;
30298    fn deser(
30299        _version: MavlinkVersion,
30300        __input: &[u8],
30301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30302        let avail_len = __input.len();
30303        let mut payload_buf = [0; Self::ENCODED_LEN];
30304        let mut buf = if avail_len < Self::ENCODED_LEN {
30305            payload_buf[0..avail_len].copy_from_slice(__input);
30306            Bytes::new(&payload_buf)
30307        } else {
30308            Bytes::new(__input)
30309        };
30310        let mut __struct = Self::default();
30311        __struct.safe_return = buf.get_i32_le();
30312        __struct.land = buf.get_i32_le();
30313        __struct.mission_next_item = buf.get_i32_le();
30314        __struct.mission_end = buf.get_i32_le();
30315        __struct.commanded_action = buf.get_i32_le();
30316        Ok(__struct)
30317    }
30318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30319        let mut __tmp = BytesMut::new(bytes);
30320        #[allow(clippy::absurd_extreme_comparisons)]
30321        #[allow(unused_comparisons)]
30322        if __tmp.remaining() < Self::ENCODED_LEN {
30323            panic!(
30324                "buffer is too small (need {} bytes, but got {})",
30325                Self::ENCODED_LEN,
30326                __tmp.remaining(),
30327            )
30328        }
30329        __tmp.put_i32_le(self.safe_return);
30330        __tmp.put_i32_le(self.land);
30331        __tmp.put_i32_le(self.mission_next_item);
30332        __tmp.put_i32_le(self.mission_end);
30333        __tmp.put_i32_le(self.commanded_action);
30334        if matches!(version, MavlinkVersion::V2) {
30335            let len = __tmp.len();
30336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30337        } else {
30338            __tmp.len()
30339        }
30340    }
30341}
30342#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30343#[doc = ""]
30344#[doc = "ID: 333"]
30345#[derive(Debug, Clone, PartialEq)]
30346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30348#[cfg_attr(feature = "ts", derive(TS))]
30349#[cfg_attr(feature = "ts", ts(export))]
30350pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30351    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30352    pub time_usec: u64,
30353    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30356    pub pos_x: [f32; 5],
30357    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30359    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30360    pub pos_y: [f32; 5],
30361    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30363    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30364    pub pos_z: [f32; 5],
30365    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30368    pub delta: [f32; 5],
30369    #[doc = "Yaw. Set to NaN for unchanged"]
30370    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30371    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30372    pub pos_yaw: [f32; 5],
30373    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30374    pub valid_points: u8,
30375}
30376impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30377    pub const ENCODED_LEN: usize = 109usize;
30378    pub const DEFAULT: Self = Self {
30379        time_usec: 0_u64,
30380        pos_x: [0.0_f32; 5usize],
30381        pos_y: [0.0_f32; 5usize],
30382        pos_z: [0.0_f32; 5usize],
30383        delta: [0.0_f32; 5usize],
30384        pos_yaw: [0.0_f32; 5usize],
30385        valid_points: 0_u8,
30386    };
30387    #[cfg(feature = "arbitrary")]
30388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30389        use arbitrary::{Arbitrary, Unstructured};
30390        let mut buf = [0u8; 1024];
30391        rng.fill_bytes(&mut buf);
30392        let mut unstructured = Unstructured::new(&buf);
30393        Self::arbitrary(&mut unstructured).unwrap_or_default()
30394    }
30395}
30396impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30397    fn default() -> Self {
30398        Self::DEFAULT.clone()
30399    }
30400}
30401impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30402    type Message = MavMessage;
30403    const ID: u32 = 333u32;
30404    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30405    const EXTRA_CRC: u8 = 231u8;
30406    const ENCODED_LEN: usize = 109usize;
30407    fn deser(
30408        _version: MavlinkVersion,
30409        __input: &[u8],
30410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30411        let avail_len = __input.len();
30412        let mut payload_buf = [0; Self::ENCODED_LEN];
30413        let mut buf = if avail_len < Self::ENCODED_LEN {
30414            payload_buf[0..avail_len].copy_from_slice(__input);
30415            Bytes::new(&payload_buf)
30416        } else {
30417            Bytes::new(__input)
30418        };
30419        let mut __struct = Self::default();
30420        __struct.time_usec = buf.get_u64_le();
30421        for v in &mut __struct.pos_x {
30422            let val = buf.get_f32_le();
30423            *v = val;
30424        }
30425        for v in &mut __struct.pos_y {
30426            let val = buf.get_f32_le();
30427            *v = val;
30428        }
30429        for v in &mut __struct.pos_z {
30430            let val = buf.get_f32_le();
30431            *v = val;
30432        }
30433        for v in &mut __struct.delta {
30434            let val = buf.get_f32_le();
30435            *v = val;
30436        }
30437        for v in &mut __struct.pos_yaw {
30438            let val = buf.get_f32_le();
30439            *v = val;
30440        }
30441        __struct.valid_points = buf.get_u8();
30442        Ok(__struct)
30443    }
30444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30445        let mut __tmp = BytesMut::new(bytes);
30446        #[allow(clippy::absurd_extreme_comparisons)]
30447        #[allow(unused_comparisons)]
30448        if __tmp.remaining() < Self::ENCODED_LEN {
30449            panic!(
30450                "buffer is too small (need {} bytes, but got {})",
30451                Self::ENCODED_LEN,
30452                __tmp.remaining(),
30453            )
30454        }
30455        __tmp.put_u64_le(self.time_usec);
30456        for val in &self.pos_x {
30457            __tmp.put_f32_le(*val);
30458        }
30459        for val in &self.pos_y {
30460            __tmp.put_f32_le(*val);
30461        }
30462        for val in &self.pos_z {
30463            __tmp.put_f32_le(*val);
30464        }
30465        for val in &self.delta {
30466            __tmp.put_f32_le(*val);
30467        }
30468        for val in &self.pos_yaw {
30469            __tmp.put_f32_le(*val);
30470        }
30471        __tmp.put_u8(self.valid_points);
30472        if matches!(version, MavlinkVersion::V2) {
30473            let len = __tmp.len();
30474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30475        } else {
30476            __tmp.len()
30477        }
30478    }
30479}
30480#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30481#[doc = ""]
30482#[doc = "ID: 332"]
30483#[derive(Debug, Clone, PartialEq)]
30484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30486#[cfg_attr(feature = "ts", derive(TS))]
30487#[cfg_attr(feature = "ts", ts(export))]
30488pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30489    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30490    pub time_usec: u64,
30491    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30493    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30494    pub pos_x: [f32; 5],
30495    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30498    pub pos_y: [f32; 5],
30499    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30500    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30501    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30502    pub pos_z: [f32; 5],
30503    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30505    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30506    pub vel_x: [f32; 5],
30507    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30510    pub vel_y: [f32; 5],
30511    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30514    pub vel_z: [f32; 5],
30515    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30517    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30518    pub acc_x: [f32; 5],
30519    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30521    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30522    pub acc_y: [f32; 5],
30523    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30526    pub acc_z: [f32; 5],
30527    #[doc = "Yaw angle, set to NaN if not being used"]
30528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30529    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30530    pub pos_yaw: [f32; 5],
30531    #[doc = "Yaw rate, set to NaN if not being used"]
30532    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30533    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30534    pub vel_yaw: [f32; 5],
30535    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30536    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30537    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30538    pub command: [u16; 5],
30539    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30540    pub valid_points: u8,
30541}
30542impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30543    pub const ENCODED_LEN: usize = 239usize;
30544    pub const DEFAULT: Self = Self {
30545        time_usec: 0_u64,
30546        pos_x: [0.0_f32; 5usize],
30547        pos_y: [0.0_f32; 5usize],
30548        pos_z: [0.0_f32; 5usize],
30549        vel_x: [0.0_f32; 5usize],
30550        vel_y: [0.0_f32; 5usize],
30551        vel_z: [0.0_f32; 5usize],
30552        acc_x: [0.0_f32; 5usize],
30553        acc_y: [0.0_f32; 5usize],
30554        acc_z: [0.0_f32; 5usize],
30555        pos_yaw: [0.0_f32; 5usize],
30556        vel_yaw: [0.0_f32; 5usize],
30557        command: [0_u16; 5usize],
30558        valid_points: 0_u8,
30559    };
30560    #[cfg(feature = "arbitrary")]
30561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30562        use arbitrary::{Arbitrary, Unstructured};
30563        let mut buf = [0u8; 1024];
30564        rng.fill_bytes(&mut buf);
30565        let mut unstructured = Unstructured::new(&buf);
30566        Self::arbitrary(&mut unstructured).unwrap_or_default()
30567    }
30568}
30569impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30570    fn default() -> Self {
30571        Self::DEFAULT.clone()
30572    }
30573}
30574impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30575    type Message = MavMessage;
30576    const ID: u32 = 332u32;
30577    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30578    const EXTRA_CRC: u8 = 236u8;
30579    const ENCODED_LEN: usize = 239usize;
30580    fn deser(
30581        _version: MavlinkVersion,
30582        __input: &[u8],
30583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30584        let avail_len = __input.len();
30585        let mut payload_buf = [0; Self::ENCODED_LEN];
30586        let mut buf = if avail_len < Self::ENCODED_LEN {
30587            payload_buf[0..avail_len].copy_from_slice(__input);
30588            Bytes::new(&payload_buf)
30589        } else {
30590            Bytes::new(__input)
30591        };
30592        let mut __struct = Self::default();
30593        __struct.time_usec = buf.get_u64_le();
30594        for v in &mut __struct.pos_x {
30595            let val = buf.get_f32_le();
30596            *v = val;
30597        }
30598        for v in &mut __struct.pos_y {
30599            let val = buf.get_f32_le();
30600            *v = val;
30601        }
30602        for v in &mut __struct.pos_z {
30603            let val = buf.get_f32_le();
30604            *v = val;
30605        }
30606        for v in &mut __struct.vel_x {
30607            let val = buf.get_f32_le();
30608            *v = val;
30609        }
30610        for v in &mut __struct.vel_y {
30611            let val = buf.get_f32_le();
30612            *v = val;
30613        }
30614        for v in &mut __struct.vel_z {
30615            let val = buf.get_f32_le();
30616            *v = val;
30617        }
30618        for v in &mut __struct.acc_x {
30619            let val = buf.get_f32_le();
30620            *v = val;
30621        }
30622        for v in &mut __struct.acc_y {
30623            let val = buf.get_f32_le();
30624            *v = val;
30625        }
30626        for v in &mut __struct.acc_z {
30627            let val = buf.get_f32_le();
30628            *v = val;
30629        }
30630        for v in &mut __struct.pos_yaw {
30631            let val = buf.get_f32_le();
30632            *v = val;
30633        }
30634        for v in &mut __struct.vel_yaw {
30635            let val = buf.get_f32_le();
30636            *v = val;
30637        }
30638        for v in &mut __struct.command {
30639            let val = buf.get_u16_le();
30640            *v = val;
30641        }
30642        __struct.valid_points = buf.get_u8();
30643        Ok(__struct)
30644    }
30645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30646        let mut __tmp = BytesMut::new(bytes);
30647        #[allow(clippy::absurd_extreme_comparisons)]
30648        #[allow(unused_comparisons)]
30649        if __tmp.remaining() < Self::ENCODED_LEN {
30650            panic!(
30651                "buffer is too small (need {} bytes, but got {})",
30652                Self::ENCODED_LEN,
30653                __tmp.remaining(),
30654            )
30655        }
30656        __tmp.put_u64_le(self.time_usec);
30657        for val in &self.pos_x {
30658            __tmp.put_f32_le(*val);
30659        }
30660        for val in &self.pos_y {
30661            __tmp.put_f32_le(*val);
30662        }
30663        for val in &self.pos_z {
30664            __tmp.put_f32_le(*val);
30665        }
30666        for val in &self.vel_x {
30667            __tmp.put_f32_le(*val);
30668        }
30669        for val in &self.vel_y {
30670            __tmp.put_f32_le(*val);
30671        }
30672        for val in &self.vel_z {
30673            __tmp.put_f32_le(*val);
30674        }
30675        for val in &self.acc_x {
30676            __tmp.put_f32_le(*val);
30677        }
30678        for val in &self.acc_y {
30679            __tmp.put_f32_le(*val);
30680        }
30681        for val in &self.acc_z {
30682            __tmp.put_f32_le(*val);
30683        }
30684        for val in &self.pos_yaw {
30685            __tmp.put_f32_le(*val);
30686        }
30687        for val in &self.vel_yaw {
30688            __tmp.put_f32_le(*val);
30689        }
30690        for val in &self.command {
30691            __tmp.put_u16_le(*val);
30692        }
30693        __tmp.put_u8(self.valid_points);
30694        if matches!(version, MavlinkVersion::V2) {
30695            let len = __tmp.len();
30696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30697        } else {
30698            __tmp.len()
30699        }
30700    }
30701}
30702#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30703#[doc = ""]
30704#[doc = "ID: 385"]
30705#[derive(Debug, Clone, PartialEq)]
30706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30708#[cfg_attr(feature = "ts", derive(TS))]
30709#[cfg_attr(feature = "ts", ts(export))]
30710pub struct TUNNEL_DATA {
30711    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30712    pub payload_type: MavTunnelPayloadType,
30713    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30714    pub target_system: u8,
30715    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30716    pub target_component: u8,
30717    #[doc = "Length of the data transported in payload"]
30718    pub payload_length: u8,
30719    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30722    pub payload: [u8; 128],
30723}
30724impl TUNNEL_DATA {
30725    pub const ENCODED_LEN: usize = 133usize;
30726    pub const DEFAULT: Self = Self {
30727        payload_type: MavTunnelPayloadType::DEFAULT,
30728        target_system: 0_u8,
30729        target_component: 0_u8,
30730        payload_length: 0_u8,
30731        payload: [0_u8; 128usize],
30732    };
30733    #[cfg(feature = "arbitrary")]
30734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30735        use arbitrary::{Arbitrary, Unstructured};
30736        let mut buf = [0u8; 1024];
30737        rng.fill_bytes(&mut buf);
30738        let mut unstructured = Unstructured::new(&buf);
30739        Self::arbitrary(&mut unstructured).unwrap_or_default()
30740    }
30741}
30742impl Default for TUNNEL_DATA {
30743    fn default() -> Self {
30744        Self::DEFAULT.clone()
30745    }
30746}
30747impl MessageData for TUNNEL_DATA {
30748    type Message = MavMessage;
30749    const ID: u32 = 385u32;
30750    const NAME: &'static str = "TUNNEL";
30751    const EXTRA_CRC: u8 = 147u8;
30752    const ENCODED_LEN: usize = 133usize;
30753    fn deser(
30754        _version: MavlinkVersion,
30755        __input: &[u8],
30756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30757        let avail_len = __input.len();
30758        let mut payload_buf = [0; Self::ENCODED_LEN];
30759        let mut buf = if avail_len < Self::ENCODED_LEN {
30760            payload_buf[0..avail_len].copy_from_slice(__input);
30761            Bytes::new(&payload_buf)
30762        } else {
30763            Bytes::new(__input)
30764        };
30765        let mut __struct = Self::default();
30766        let tmp = buf.get_u16_le();
30767        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30768            ::mavlink_core::error::ParserError::InvalidEnum {
30769                enum_type: "MavTunnelPayloadType",
30770                value: tmp as u32,
30771            },
30772        )?;
30773        __struct.target_system = buf.get_u8();
30774        __struct.target_component = buf.get_u8();
30775        __struct.payload_length = buf.get_u8();
30776        for v in &mut __struct.payload {
30777            let val = buf.get_u8();
30778            *v = val;
30779        }
30780        Ok(__struct)
30781    }
30782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30783        let mut __tmp = BytesMut::new(bytes);
30784        #[allow(clippy::absurd_extreme_comparisons)]
30785        #[allow(unused_comparisons)]
30786        if __tmp.remaining() < Self::ENCODED_LEN {
30787            panic!(
30788                "buffer is too small (need {} bytes, but got {})",
30789                Self::ENCODED_LEN,
30790                __tmp.remaining(),
30791            )
30792        }
30793        __tmp.put_u16_le(self.payload_type as u16);
30794        __tmp.put_u8(self.target_system);
30795        __tmp.put_u8(self.target_component);
30796        __tmp.put_u8(self.payload_length);
30797        for val in &self.payload {
30798            __tmp.put_u8(*val);
30799        }
30800        if matches!(version, MavlinkVersion::V2) {
30801            let len = __tmp.len();
30802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30803        } else {
30804            __tmp.len()
30805        }
30806    }
30807}
30808#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30809#[doc = ""]
30810#[doc = "ID: 311"]
30811#[derive(Debug, Clone, PartialEq)]
30812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30814#[cfg_attr(feature = "ts", derive(TS))]
30815#[cfg_attr(feature = "ts", ts(export))]
30816pub struct UAVCAN_NODE_INFO_DATA {
30817    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30818    pub time_usec: u64,
30819    #[doc = "Time since the start-up of the node."]
30820    pub uptime_sec: u32,
30821    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30822    pub sw_vcs_commit: u32,
30823    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30824    #[cfg_attr(feature = "ts", ts(type = "string"))]
30825    pub name: CharArray<80>,
30826    #[doc = "Hardware major version number."]
30827    pub hw_version_major: u8,
30828    #[doc = "Hardware minor version number."]
30829    pub hw_version_minor: u8,
30830    #[doc = "Hardware unique 128-bit ID."]
30831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30833    pub hw_unique_id: [u8; 16],
30834    #[doc = "Software major version number."]
30835    pub sw_version_major: u8,
30836    #[doc = "Software minor version number."]
30837    pub sw_version_minor: u8,
30838}
30839impl UAVCAN_NODE_INFO_DATA {
30840    pub const ENCODED_LEN: usize = 116usize;
30841    pub const DEFAULT: Self = Self {
30842        time_usec: 0_u64,
30843        uptime_sec: 0_u32,
30844        sw_vcs_commit: 0_u32,
30845        name: CharArray::new([0_u8; 80usize]),
30846        hw_version_major: 0_u8,
30847        hw_version_minor: 0_u8,
30848        hw_unique_id: [0_u8; 16usize],
30849        sw_version_major: 0_u8,
30850        sw_version_minor: 0_u8,
30851    };
30852    #[cfg(feature = "arbitrary")]
30853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30854        use arbitrary::{Arbitrary, Unstructured};
30855        let mut buf = [0u8; 1024];
30856        rng.fill_bytes(&mut buf);
30857        let mut unstructured = Unstructured::new(&buf);
30858        Self::arbitrary(&mut unstructured).unwrap_or_default()
30859    }
30860}
30861impl Default for UAVCAN_NODE_INFO_DATA {
30862    fn default() -> Self {
30863        Self::DEFAULT.clone()
30864    }
30865}
30866impl MessageData for UAVCAN_NODE_INFO_DATA {
30867    type Message = MavMessage;
30868    const ID: u32 = 311u32;
30869    const NAME: &'static str = "UAVCAN_NODE_INFO";
30870    const EXTRA_CRC: u8 = 95u8;
30871    const ENCODED_LEN: usize = 116usize;
30872    fn deser(
30873        _version: MavlinkVersion,
30874        __input: &[u8],
30875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30876        let avail_len = __input.len();
30877        let mut payload_buf = [0; Self::ENCODED_LEN];
30878        let mut buf = if avail_len < Self::ENCODED_LEN {
30879            payload_buf[0..avail_len].copy_from_slice(__input);
30880            Bytes::new(&payload_buf)
30881        } else {
30882            Bytes::new(__input)
30883        };
30884        let mut __struct = Self::default();
30885        __struct.time_usec = buf.get_u64_le();
30886        __struct.uptime_sec = buf.get_u32_le();
30887        __struct.sw_vcs_commit = buf.get_u32_le();
30888        let mut tmp = [0_u8; 80usize];
30889        for v in &mut tmp {
30890            *v = buf.get_u8();
30891        }
30892        __struct.name = CharArray::new(tmp);
30893        __struct.hw_version_major = buf.get_u8();
30894        __struct.hw_version_minor = buf.get_u8();
30895        for v in &mut __struct.hw_unique_id {
30896            let val = buf.get_u8();
30897            *v = val;
30898        }
30899        __struct.sw_version_major = buf.get_u8();
30900        __struct.sw_version_minor = buf.get_u8();
30901        Ok(__struct)
30902    }
30903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30904        let mut __tmp = BytesMut::new(bytes);
30905        #[allow(clippy::absurd_extreme_comparisons)]
30906        #[allow(unused_comparisons)]
30907        if __tmp.remaining() < Self::ENCODED_LEN {
30908            panic!(
30909                "buffer is too small (need {} bytes, but got {})",
30910                Self::ENCODED_LEN,
30911                __tmp.remaining(),
30912            )
30913        }
30914        __tmp.put_u64_le(self.time_usec);
30915        __tmp.put_u32_le(self.uptime_sec);
30916        __tmp.put_u32_le(self.sw_vcs_commit);
30917        for val in &self.name {
30918            __tmp.put_u8(*val);
30919        }
30920        __tmp.put_u8(self.hw_version_major);
30921        __tmp.put_u8(self.hw_version_minor);
30922        for val in &self.hw_unique_id {
30923            __tmp.put_u8(*val);
30924        }
30925        __tmp.put_u8(self.sw_version_major);
30926        __tmp.put_u8(self.sw_version_minor);
30927        if matches!(version, MavlinkVersion::V2) {
30928            let len = __tmp.len();
30929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30930        } else {
30931            __tmp.len()
30932        }
30933    }
30934}
30935#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30936#[doc = ""]
30937#[doc = "ID: 310"]
30938#[derive(Debug, Clone, PartialEq)]
30939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30941#[cfg_attr(feature = "ts", derive(TS))]
30942#[cfg_attr(feature = "ts", ts(export))]
30943pub struct UAVCAN_NODE_STATUS_DATA {
30944    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30945    pub time_usec: u64,
30946    #[doc = "Time since the start-up of the node."]
30947    pub uptime_sec: u32,
30948    #[doc = "Vendor-specific status information."]
30949    pub vendor_specific_status_code: u16,
30950    #[doc = "Generalized node health status."]
30951    pub health: UavcanNodeHealth,
30952    #[doc = "Generalized operating mode."]
30953    pub mode: UavcanNodeMode,
30954    #[doc = "Not used currently."]
30955    pub sub_mode: u8,
30956}
30957impl UAVCAN_NODE_STATUS_DATA {
30958    pub const ENCODED_LEN: usize = 17usize;
30959    pub const DEFAULT: Self = Self {
30960        time_usec: 0_u64,
30961        uptime_sec: 0_u32,
30962        vendor_specific_status_code: 0_u16,
30963        health: UavcanNodeHealth::DEFAULT,
30964        mode: UavcanNodeMode::DEFAULT,
30965        sub_mode: 0_u8,
30966    };
30967    #[cfg(feature = "arbitrary")]
30968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30969        use arbitrary::{Arbitrary, Unstructured};
30970        let mut buf = [0u8; 1024];
30971        rng.fill_bytes(&mut buf);
30972        let mut unstructured = Unstructured::new(&buf);
30973        Self::arbitrary(&mut unstructured).unwrap_or_default()
30974    }
30975}
30976impl Default for UAVCAN_NODE_STATUS_DATA {
30977    fn default() -> Self {
30978        Self::DEFAULT.clone()
30979    }
30980}
30981impl MessageData for UAVCAN_NODE_STATUS_DATA {
30982    type Message = MavMessage;
30983    const ID: u32 = 310u32;
30984    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30985    const EXTRA_CRC: u8 = 28u8;
30986    const ENCODED_LEN: usize = 17usize;
30987    fn deser(
30988        _version: MavlinkVersion,
30989        __input: &[u8],
30990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30991        let avail_len = __input.len();
30992        let mut payload_buf = [0; Self::ENCODED_LEN];
30993        let mut buf = if avail_len < Self::ENCODED_LEN {
30994            payload_buf[0..avail_len].copy_from_slice(__input);
30995            Bytes::new(&payload_buf)
30996        } else {
30997            Bytes::new(__input)
30998        };
30999        let mut __struct = Self::default();
31000        __struct.time_usec = buf.get_u64_le();
31001        __struct.uptime_sec = buf.get_u32_le();
31002        __struct.vendor_specific_status_code = buf.get_u16_le();
31003        let tmp = buf.get_u8();
31004        __struct.health =
31005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31006                enum_type: "UavcanNodeHealth",
31007                value: tmp as u32,
31008            })?;
31009        let tmp = buf.get_u8();
31010        __struct.mode =
31011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31012                enum_type: "UavcanNodeMode",
31013                value: tmp as u32,
31014            })?;
31015        __struct.sub_mode = buf.get_u8();
31016        Ok(__struct)
31017    }
31018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31019        let mut __tmp = BytesMut::new(bytes);
31020        #[allow(clippy::absurd_extreme_comparisons)]
31021        #[allow(unused_comparisons)]
31022        if __tmp.remaining() < Self::ENCODED_LEN {
31023            panic!(
31024                "buffer is too small (need {} bytes, but got {})",
31025                Self::ENCODED_LEN,
31026                __tmp.remaining(),
31027            )
31028        }
31029        __tmp.put_u64_le(self.time_usec);
31030        __tmp.put_u32_le(self.uptime_sec);
31031        __tmp.put_u16_le(self.vendor_specific_status_code);
31032        __tmp.put_u8(self.health as u8);
31033        __tmp.put_u8(self.mode as u8);
31034        __tmp.put_u8(self.sub_mode);
31035        if matches!(version, MavlinkVersion::V2) {
31036            let len = __tmp.len();
31037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31038        } else {
31039            __tmp.len()
31040        }
31041    }
31042}
31043#[doc = "The global position resulting from GPS and sensor fusion."]
31044#[doc = ""]
31045#[doc = "ID: 340"]
31046#[derive(Debug, Clone, PartialEq)]
31047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31049#[cfg_attr(feature = "ts", derive(TS))]
31050#[cfg_attr(feature = "ts", ts(export))]
31051pub struct UTM_GLOBAL_POSITION_DATA {
31052    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31053    pub time: u64,
31054    #[doc = "Latitude (WGS84)"]
31055    pub lat: i32,
31056    #[doc = "Longitude (WGS84)"]
31057    pub lon: i32,
31058    #[doc = "Altitude (WGS84)"]
31059    pub alt: i32,
31060    #[doc = "Altitude above ground"]
31061    pub relative_alt: i32,
31062    #[doc = "Next waypoint, latitude (WGS84)"]
31063    pub next_lat: i32,
31064    #[doc = "Next waypoint, longitude (WGS84)"]
31065    pub next_lon: i32,
31066    #[doc = "Next waypoint, altitude (WGS84)"]
31067    pub next_alt: i32,
31068    #[doc = "Ground X speed (latitude, positive north)"]
31069    pub vx: i16,
31070    #[doc = "Ground Y speed (longitude, positive east)"]
31071    pub vy: i16,
31072    #[doc = "Ground Z speed (altitude, positive down)"]
31073    pub vz: i16,
31074    #[doc = "Horizontal position uncertainty (standard deviation)"]
31075    pub h_acc: u16,
31076    #[doc = "Altitude uncertainty (standard deviation)"]
31077    pub v_acc: u16,
31078    #[doc = "Speed uncertainty (standard deviation)"]
31079    pub vel_acc: u16,
31080    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31081    pub update_rate: u16,
31082    #[doc = "Unique UAS ID."]
31083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31085    pub uas_id: [u8; 18],
31086    #[doc = "Flight state"]
31087    pub flight_state: UtmFlightState,
31088    #[doc = "Bitwise OR combination of the data available flags."]
31089    pub flags: UtmDataAvailFlags,
31090}
31091impl UTM_GLOBAL_POSITION_DATA {
31092    pub const ENCODED_LEN: usize = 70usize;
31093    pub const DEFAULT: Self = Self {
31094        time: 0_u64,
31095        lat: 0_i32,
31096        lon: 0_i32,
31097        alt: 0_i32,
31098        relative_alt: 0_i32,
31099        next_lat: 0_i32,
31100        next_lon: 0_i32,
31101        next_alt: 0_i32,
31102        vx: 0_i16,
31103        vy: 0_i16,
31104        vz: 0_i16,
31105        h_acc: 0_u16,
31106        v_acc: 0_u16,
31107        vel_acc: 0_u16,
31108        update_rate: 0_u16,
31109        uas_id: [0_u8; 18usize],
31110        flight_state: UtmFlightState::DEFAULT,
31111        flags: UtmDataAvailFlags::DEFAULT,
31112    };
31113    #[cfg(feature = "arbitrary")]
31114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31115        use arbitrary::{Arbitrary, Unstructured};
31116        let mut buf = [0u8; 1024];
31117        rng.fill_bytes(&mut buf);
31118        let mut unstructured = Unstructured::new(&buf);
31119        Self::arbitrary(&mut unstructured).unwrap_or_default()
31120    }
31121}
31122impl Default for UTM_GLOBAL_POSITION_DATA {
31123    fn default() -> Self {
31124        Self::DEFAULT.clone()
31125    }
31126}
31127impl MessageData for UTM_GLOBAL_POSITION_DATA {
31128    type Message = MavMessage;
31129    const ID: u32 = 340u32;
31130    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31131    const EXTRA_CRC: u8 = 99u8;
31132    const ENCODED_LEN: usize = 70usize;
31133    fn deser(
31134        _version: MavlinkVersion,
31135        __input: &[u8],
31136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31137        let avail_len = __input.len();
31138        let mut payload_buf = [0; Self::ENCODED_LEN];
31139        let mut buf = if avail_len < Self::ENCODED_LEN {
31140            payload_buf[0..avail_len].copy_from_slice(__input);
31141            Bytes::new(&payload_buf)
31142        } else {
31143            Bytes::new(__input)
31144        };
31145        let mut __struct = Self::default();
31146        __struct.time = buf.get_u64_le();
31147        __struct.lat = buf.get_i32_le();
31148        __struct.lon = buf.get_i32_le();
31149        __struct.alt = buf.get_i32_le();
31150        __struct.relative_alt = buf.get_i32_le();
31151        __struct.next_lat = buf.get_i32_le();
31152        __struct.next_lon = buf.get_i32_le();
31153        __struct.next_alt = buf.get_i32_le();
31154        __struct.vx = buf.get_i16_le();
31155        __struct.vy = buf.get_i16_le();
31156        __struct.vz = buf.get_i16_le();
31157        __struct.h_acc = buf.get_u16_le();
31158        __struct.v_acc = buf.get_u16_le();
31159        __struct.vel_acc = buf.get_u16_le();
31160        __struct.update_rate = buf.get_u16_le();
31161        for v in &mut __struct.uas_id {
31162            let val = buf.get_u8();
31163            *v = val;
31164        }
31165        let tmp = buf.get_u8();
31166        __struct.flight_state =
31167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31168                enum_type: "UtmFlightState",
31169                value: tmp as u32,
31170            })?;
31171        let tmp = buf.get_u8();
31172        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31173            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31174                flag_type: "UtmDataAvailFlags",
31175                value: tmp as u32,
31176            })?;
31177        Ok(__struct)
31178    }
31179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31180        let mut __tmp = BytesMut::new(bytes);
31181        #[allow(clippy::absurd_extreme_comparisons)]
31182        #[allow(unused_comparisons)]
31183        if __tmp.remaining() < Self::ENCODED_LEN {
31184            panic!(
31185                "buffer is too small (need {} bytes, but got {})",
31186                Self::ENCODED_LEN,
31187                __tmp.remaining(),
31188            )
31189        }
31190        __tmp.put_u64_le(self.time);
31191        __tmp.put_i32_le(self.lat);
31192        __tmp.put_i32_le(self.lon);
31193        __tmp.put_i32_le(self.alt);
31194        __tmp.put_i32_le(self.relative_alt);
31195        __tmp.put_i32_le(self.next_lat);
31196        __tmp.put_i32_le(self.next_lon);
31197        __tmp.put_i32_le(self.next_alt);
31198        __tmp.put_i16_le(self.vx);
31199        __tmp.put_i16_le(self.vy);
31200        __tmp.put_i16_le(self.vz);
31201        __tmp.put_u16_le(self.h_acc);
31202        __tmp.put_u16_le(self.v_acc);
31203        __tmp.put_u16_le(self.vel_acc);
31204        __tmp.put_u16_le(self.update_rate);
31205        for val in &self.uas_id {
31206            __tmp.put_u8(*val);
31207        }
31208        __tmp.put_u8(self.flight_state as u8);
31209        __tmp.put_u8(self.flags.bits());
31210        if matches!(version, MavlinkVersion::V2) {
31211            let len = __tmp.len();
31212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31213        } else {
31214            __tmp.len()
31215        }
31216    }
31217}
31218#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31219#[doc = ""]
31220#[doc = "ID: 248"]
31221#[derive(Debug, Clone, PartialEq)]
31222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31224#[cfg_attr(feature = "ts", derive(TS))]
31225#[cfg_attr(feature = "ts", ts(export))]
31226pub struct V2_EXTENSION_DATA {
31227    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31228    pub message_type: u16,
31229    #[doc = "Network ID (0 for broadcast)"]
31230    pub target_network: u8,
31231    #[doc = "System ID (0 for broadcast)"]
31232    pub target_system: u8,
31233    #[doc = "Component ID (0 for broadcast)"]
31234    pub target_component: u8,
31235    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31237    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31238    pub payload: [u8; 249],
31239}
31240impl V2_EXTENSION_DATA {
31241    pub const ENCODED_LEN: usize = 254usize;
31242    pub const DEFAULT: Self = Self {
31243        message_type: 0_u16,
31244        target_network: 0_u8,
31245        target_system: 0_u8,
31246        target_component: 0_u8,
31247        payload: [0_u8; 249usize],
31248    };
31249    #[cfg(feature = "arbitrary")]
31250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31251        use arbitrary::{Arbitrary, Unstructured};
31252        let mut buf = [0u8; 1024];
31253        rng.fill_bytes(&mut buf);
31254        let mut unstructured = Unstructured::new(&buf);
31255        Self::arbitrary(&mut unstructured).unwrap_or_default()
31256    }
31257}
31258impl Default for V2_EXTENSION_DATA {
31259    fn default() -> Self {
31260        Self::DEFAULT.clone()
31261    }
31262}
31263impl MessageData for V2_EXTENSION_DATA {
31264    type Message = MavMessage;
31265    const ID: u32 = 248u32;
31266    const NAME: &'static str = "V2_EXTENSION";
31267    const EXTRA_CRC: u8 = 8u8;
31268    const ENCODED_LEN: usize = 254usize;
31269    fn deser(
31270        _version: MavlinkVersion,
31271        __input: &[u8],
31272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31273        let avail_len = __input.len();
31274        let mut payload_buf = [0; Self::ENCODED_LEN];
31275        let mut buf = if avail_len < Self::ENCODED_LEN {
31276            payload_buf[0..avail_len].copy_from_slice(__input);
31277            Bytes::new(&payload_buf)
31278        } else {
31279            Bytes::new(__input)
31280        };
31281        let mut __struct = Self::default();
31282        __struct.message_type = buf.get_u16_le();
31283        __struct.target_network = buf.get_u8();
31284        __struct.target_system = buf.get_u8();
31285        __struct.target_component = buf.get_u8();
31286        for v in &mut __struct.payload {
31287            let val = buf.get_u8();
31288            *v = val;
31289        }
31290        Ok(__struct)
31291    }
31292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31293        let mut __tmp = BytesMut::new(bytes);
31294        #[allow(clippy::absurd_extreme_comparisons)]
31295        #[allow(unused_comparisons)]
31296        if __tmp.remaining() < Self::ENCODED_LEN {
31297            panic!(
31298                "buffer is too small (need {} bytes, but got {})",
31299                Self::ENCODED_LEN,
31300                __tmp.remaining(),
31301            )
31302        }
31303        __tmp.put_u16_le(self.message_type);
31304        __tmp.put_u8(self.target_network);
31305        __tmp.put_u8(self.target_system);
31306        __tmp.put_u8(self.target_component);
31307        for val in &self.payload {
31308            __tmp.put_u8(*val);
31309        }
31310        if matches!(version, MavlinkVersion::V2) {
31311            let len = __tmp.len();
31312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31313        } else {
31314            __tmp.len()
31315        }
31316    }
31317}
31318#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31319#[doc = ""]
31320#[doc = "ID: 74"]
31321#[derive(Debug, Clone, PartialEq)]
31322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31324#[cfg_attr(feature = "ts", derive(TS))]
31325#[cfg_attr(feature = "ts", ts(export))]
31326pub struct VFR_HUD_DATA {
31327    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31328    pub airspeed: f32,
31329    #[doc = "Current ground speed."]
31330    pub groundspeed: f32,
31331    #[doc = "Current altitude (MSL)."]
31332    pub alt: f32,
31333    #[doc = "Current climb rate."]
31334    pub climb: f32,
31335    #[doc = "Current heading in compass units (0-360, 0=north)."]
31336    pub heading: i16,
31337    #[doc = "Current throttle setting (0 to 100)."]
31338    pub throttle: u16,
31339}
31340impl VFR_HUD_DATA {
31341    pub const ENCODED_LEN: usize = 20usize;
31342    pub const DEFAULT: Self = Self {
31343        airspeed: 0.0_f32,
31344        groundspeed: 0.0_f32,
31345        alt: 0.0_f32,
31346        climb: 0.0_f32,
31347        heading: 0_i16,
31348        throttle: 0_u16,
31349    };
31350    #[cfg(feature = "arbitrary")]
31351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31352        use arbitrary::{Arbitrary, Unstructured};
31353        let mut buf = [0u8; 1024];
31354        rng.fill_bytes(&mut buf);
31355        let mut unstructured = Unstructured::new(&buf);
31356        Self::arbitrary(&mut unstructured).unwrap_or_default()
31357    }
31358}
31359impl Default for VFR_HUD_DATA {
31360    fn default() -> Self {
31361        Self::DEFAULT.clone()
31362    }
31363}
31364impl MessageData for VFR_HUD_DATA {
31365    type Message = MavMessage;
31366    const ID: u32 = 74u32;
31367    const NAME: &'static str = "VFR_HUD";
31368    const EXTRA_CRC: u8 = 20u8;
31369    const ENCODED_LEN: usize = 20usize;
31370    fn deser(
31371        _version: MavlinkVersion,
31372        __input: &[u8],
31373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31374        let avail_len = __input.len();
31375        let mut payload_buf = [0; Self::ENCODED_LEN];
31376        let mut buf = if avail_len < Self::ENCODED_LEN {
31377            payload_buf[0..avail_len].copy_from_slice(__input);
31378            Bytes::new(&payload_buf)
31379        } else {
31380            Bytes::new(__input)
31381        };
31382        let mut __struct = Self::default();
31383        __struct.airspeed = buf.get_f32_le();
31384        __struct.groundspeed = buf.get_f32_le();
31385        __struct.alt = buf.get_f32_le();
31386        __struct.climb = buf.get_f32_le();
31387        __struct.heading = buf.get_i16_le();
31388        __struct.throttle = buf.get_u16_le();
31389        Ok(__struct)
31390    }
31391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31392        let mut __tmp = BytesMut::new(bytes);
31393        #[allow(clippy::absurd_extreme_comparisons)]
31394        #[allow(unused_comparisons)]
31395        if __tmp.remaining() < Self::ENCODED_LEN {
31396            panic!(
31397                "buffer is too small (need {} bytes, but got {})",
31398                Self::ENCODED_LEN,
31399                __tmp.remaining(),
31400            )
31401        }
31402        __tmp.put_f32_le(self.airspeed);
31403        __tmp.put_f32_le(self.groundspeed);
31404        __tmp.put_f32_le(self.alt);
31405        __tmp.put_f32_le(self.climb);
31406        __tmp.put_i16_le(self.heading);
31407        __tmp.put_u16_le(self.throttle);
31408        if matches!(version, MavlinkVersion::V2) {
31409            let len = __tmp.len();
31410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31411        } else {
31412            __tmp.len()
31413        }
31414    }
31415}
31416#[doc = "Vibration levels and accelerometer clipping."]
31417#[doc = ""]
31418#[doc = "ID: 241"]
31419#[derive(Debug, Clone, PartialEq)]
31420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31422#[cfg_attr(feature = "ts", derive(TS))]
31423#[cfg_attr(feature = "ts", ts(export))]
31424pub struct VIBRATION_DATA {
31425    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31426    pub time_usec: u64,
31427    #[doc = "Vibration levels on X-axis"]
31428    pub vibration_x: f32,
31429    #[doc = "Vibration levels on Y-axis"]
31430    pub vibration_y: f32,
31431    #[doc = "Vibration levels on Z-axis"]
31432    pub vibration_z: f32,
31433    #[doc = "first accelerometer clipping count"]
31434    pub clipping_0: u32,
31435    #[doc = "second accelerometer clipping count"]
31436    pub clipping_1: u32,
31437    #[doc = "third accelerometer clipping count"]
31438    pub clipping_2: u32,
31439}
31440impl VIBRATION_DATA {
31441    pub const ENCODED_LEN: usize = 32usize;
31442    pub const DEFAULT: Self = Self {
31443        time_usec: 0_u64,
31444        vibration_x: 0.0_f32,
31445        vibration_y: 0.0_f32,
31446        vibration_z: 0.0_f32,
31447        clipping_0: 0_u32,
31448        clipping_1: 0_u32,
31449        clipping_2: 0_u32,
31450    };
31451    #[cfg(feature = "arbitrary")]
31452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31453        use arbitrary::{Arbitrary, Unstructured};
31454        let mut buf = [0u8; 1024];
31455        rng.fill_bytes(&mut buf);
31456        let mut unstructured = Unstructured::new(&buf);
31457        Self::arbitrary(&mut unstructured).unwrap_or_default()
31458    }
31459}
31460impl Default for VIBRATION_DATA {
31461    fn default() -> Self {
31462        Self::DEFAULT.clone()
31463    }
31464}
31465impl MessageData for VIBRATION_DATA {
31466    type Message = MavMessage;
31467    const ID: u32 = 241u32;
31468    const NAME: &'static str = "VIBRATION";
31469    const EXTRA_CRC: u8 = 90u8;
31470    const ENCODED_LEN: usize = 32usize;
31471    fn deser(
31472        _version: MavlinkVersion,
31473        __input: &[u8],
31474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31475        let avail_len = __input.len();
31476        let mut payload_buf = [0; Self::ENCODED_LEN];
31477        let mut buf = if avail_len < Self::ENCODED_LEN {
31478            payload_buf[0..avail_len].copy_from_slice(__input);
31479            Bytes::new(&payload_buf)
31480        } else {
31481            Bytes::new(__input)
31482        };
31483        let mut __struct = Self::default();
31484        __struct.time_usec = buf.get_u64_le();
31485        __struct.vibration_x = buf.get_f32_le();
31486        __struct.vibration_y = buf.get_f32_le();
31487        __struct.vibration_z = buf.get_f32_le();
31488        __struct.clipping_0 = buf.get_u32_le();
31489        __struct.clipping_1 = buf.get_u32_le();
31490        __struct.clipping_2 = buf.get_u32_le();
31491        Ok(__struct)
31492    }
31493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31494        let mut __tmp = BytesMut::new(bytes);
31495        #[allow(clippy::absurd_extreme_comparisons)]
31496        #[allow(unused_comparisons)]
31497        if __tmp.remaining() < Self::ENCODED_LEN {
31498            panic!(
31499                "buffer is too small (need {} bytes, but got {})",
31500                Self::ENCODED_LEN,
31501                __tmp.remaining(),
31502            )
31503        }
31504        __tmp.put_u64_le(self.time_usec);
31505        __tmp.put_f32_le(self.vibration_x);
31506        __tmp.put_f32_le(self.vibration_y);
31507        __tmp.put_f32_le(self.vibration_z);
31508        __tmp.put_u32_le(self.clipping_0);
31509        __tmp.put_u32_le(self.clipping_1);
31510        __tmp.put_u32_le(self.clipping_2);
31511        if matches!(version, MavlinkVersion::V2) {
31512            let len = __tmp.len();
31513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31514        } else {
31515            __tmp.len()
31516        }
31517    }
31518}
31519#[doc = "Global position estimate from a Vicon motion system source."]
31520#[doc = ""]
31521#[doc = "ID: 104"]
31522#[derive(Debug, Clone, PartialEq)]
31523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31525#[cfg_attr(feature = "ts", derive(TS))]
31526#[cfg_attr(feature = "ts", ts(export))]
31527pub struct VICON_POSITION_ESTIMATE_DATA {
31528    #[doc = "Timestamp (UNIX time or time since system boot)"]
31529    pub usec: u64,
31530    #[doc = "Global X position"]
31531    pub x: f32,
31532    #[doc = "Global Y position"]
31533    pub y: f32,
31534    #[doc = "Global Z position"]
31535    pub z: f32,
31536    #[doc = "Roll angle"]
31537    pub roll: f32,
31538    #[doc = "Pitch angle"]
31539    pub pitch: f32,
31540    #[doc = "Yaw angle"]
31541    pub yaw: f32,
31542    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31544    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31545    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31546    pub covariance: [f32; 21],
31547}
31548impl VICON_POSITION_ESTIMATE_DATA {
31549    pub const ENCODED_LEN: usize = 116usize;
31550    pub const DEFAULT: Self = Self {
31551        usec: 0_u64,
31552        x: 0.0_f32,
31553        y: 0.0_f32,
31554        z: 0.0_f32,
31555        roll: 0.0_f32,
31556        pitch: 0.0_f32,
31557        yaw: 0.0_f32,
31558        covariance: [0.0_f32; 21usize],
31559    };
31560    #[cfg(feature = "arbitrary")]
31561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31562        use arbitrary::{Arbitrary, Unstructured};
31563        let mut buf = [0u8; 1024];
31564        rng.fill_bytes(&mut buf);
31565        let mut unstructured = Unstructured::new(&buf);
31566        Self::arbitrary(&mut unstructured).unwrap_or_default()
31567    }
31568}
31569impl Default for VICON_POSITION_ESTIMATE_DATA {
31570    fn default() -> Self {
31571        Self::DEFAULT.clone()
31572    }
31573}
31574impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31575    type Message = MavMessage;
31576    const ID: u32 = 104u32;
31577    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31578    const EXTRA_CRC: u8 = 56u8;
31579    const ENCODED_LEN: usize = 116usize;
31580    fn deser(
31581        _version: MavlinkVersion,
31582        __input: &[u8],
31583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31584        let avail_len = __input.len();
31585        let mut payload_buf = [0; Self::ENCODED_LEN];
31586        let mut buf = if avail_len < Self::ENCODED_LEN {
31587            payload_buf[0..avail_len].copy_from_slice(__input);
31588            Bytes::new(&payload_buf)
31589        } else {
31590            Bytes::new(__input)
31591        };
31592        let mut __struct = Self::default();
31593        __struct.usec = buf.get_u64_le();
31594        __struct.x = buf.get_f32_le();
31595        __struct.y = buf.get_f32_le();
31596        __struct.z = buf.get_f32_le();
31597        __struct.roll = buf.get_f32_le();
31598        __struct.pitch = buf.get_f32_le();
31599        __struct.yaw = buf.get_f32_le();
31600        for v in &mut __struct.covariance {
31601            let val = buf.get_f32_le();
31602            *v = val;
31603        }
31604        Ok(__struct)
31605    }
31606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31607        let mut __tmp = BytesMut::new(bytes);
31608        #[allow(clippy::absurd_extreme_comparisons)]
31609        #[allow(unused_comparisons)]
31610        if __tmp.remaining() < Self::ENCODED_LEN {
31611            panic!(
31612                "buffer is too small (need {} bytes, but got {})",
31613                Self::ENCODED_LEN,
31614                __tmp.remaining(),
31615            )
31616        }
31617        __tmp.put_u64_le(self.usec);
31618        __tmp.put_f32_le(self.x);
31619        __tmp.put_f32_le(self.y);
31620        __tmp.put_f32_le(self.z);
31621        __tmp.put_f32_le(self.roll);
31622        __tmp.put_f32_le(self.pitch);
31623        __tmp.put_f32_le(self.yaw);
31624        if matches!(version, MavlinkVersion::V2) {
31625            for val in &self.covariance {
31626                __tmp.put_f32_le(*val);
31627            }
31628            let len = __tmp.len();
31629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31630        } else {
31631            __tmp.len()
31632        }
31633    }
31634}
31635#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31636#[doc = ""]
31637#[doc = "ID: 269"]
31638#[derive(Debug, Clone, PartialEq)]
31639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31641#[cfg_attr(feature = "ts", derive(TS))]
31642#[cfg_attr(feature = "ts", ts(export))]
31643pub struct VIDEO_STREAM_INFORMATION_DATA {
31644    #[doc = "Frame rate."]
31645    pub framerate: f32,
31646    #[doc = "Bit rate."]
31647    pub bitrate: u32,
31648    #[doc = "Bitmap of stream status flags."]
31649    pub flags: VideoStreamStatusFlags,
31650    #[doc = "Horizontal resolution."]
31651    pub resolution_h: u16,
31652    #[doc = "Vertical resolution."]
31653    pub resolution_v: u16,
31654    #[doc = "Video image rotation clockwise."]
31655    pub rotation: u16,
31656    #[doc = "Horizontal Field of view."]
31657    pub hfov: u16,
31658    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31659    pub stream_id: u8,
31660    #[doc = "Number of streams available."]
31661    pub count: u8,
31662    #[doc = "Type of stream."]
31663    pub mavtype: VideoStreamType,
31664    #[doc = "Stream name."]
31665    #[cfg_attr(feature = "ts", ts(type = "string"))]
31666    pub name: CharArray<32>,
31667    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31668    #[cfg_attr(feature = "ts", ts(type = "string"))]
31669    pub uri: CharArray<160>,
31670    #[doc = "Encoding of stream."]
31671    #[cfg_attr(feature = "serde", serde(default))]
31672    pub encoding: VideoStreamEncoding,
31673    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31674    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31675    pub camera_device_id: u8,
31676}
31677impl VIDEO_STREAM_INFORMATION_DATA {
31678    pub const ENCODED_LEN: usize = 215usize;
31679    pub const DEFAULT: Self = Self {
31680        framerate: 0.0_f32,
31681        bitrate: 0_u32,
31682        flags: VideoStreamStatusFlags::DEFAULT,
31683        resolution_h: 0_u16,
31684        resolution_v: 0_u16,
31685        rotation: 0_u16,
31686        hfov: 0_u16,
31687        stream_id: 0_u8,
31688        count: 0_u8,
31689        mavtype: VideoStreamType::DEFAULT,
31690        name: CharArray::new([0_u8; 32usize]),
31691        uri: CharArray::new([0_u8; 160usize]),
31692        encoding: VideoStreamEncoding::DEFAULT,
31693        camera_device_id: 0_u8,
31694    };
31695    #[cfg(feature = "arbitrary")]
31696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31697        use arbitrary::{Arbitrary, Unstructured};
31698        let mut buf = [0u8; 1024];
31699        rng.fill_bytes(&mut buf);
31700        let mut unstructured = Unstructured::new(&buf);
31701        Self::arbitrary(&mut unstructured).unwrap_or_default()
31702    }
31703}
31704impl Default for VIDEO_STREAM_INFORMATION_DATA {
31705    fn default() -> Self {
31706        Self::DEFAULT.clone()
31707    }
31708}
31709impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31710    type Message = MavMessage;
31711    const ID: u32 = 269u32;
31712    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31713    const EXTRA_CRC: u8 = 109u8;
31714    const ENCODED_LEN: usize = 215usize;
31715    fn deser(
31716        _version: MavlinkVersion,
31717        __input: &[u8],
31718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31719        let avail_len = __input.len();
31720        let mut payload_buf = [0; Self::ENCODED_LEN];
31721        let mut buf = if avail_len < Self::ENCODED_LEN {
31722            payload_buf[0..avail_len].copy_from_slice(__input);
31723            Bytes::new(&payload_buf)
31724        } else {
31725            Bytes::new(__input)
31726        };
31727        let mut __struct = Self::default();
31728        __struct.framerate = buf.get_f32_le();
31729        __struct.bitrate = buf.get_u32_le();
31730        let tmp = buf.get_u16_le();
31731        __struct.flags = VideoStreamStatusFlags::from_bits(
31732            tmp & VideoStreamStatusFlags::all().bits(),
31733        )
31734        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31735            flag_type: "VideoStreamStatusFlags",
31736            value: tmp as u32,
31737        })?;
31738        __struct.resolution_h = buf.get_u16_le();
31739        __struct.resolution_v = buf.get_u16_le();
31740        __struct.rotation = buf.get_u16_le();
31741        __struct.hfov = buf.get_u16_le();
31742        __struct.stream_id = buf.get_u8();
31743        __struct.count = buf.get_u8();
31744        let tmp = buf.get_u8();
31745        __struct.mavtype =
31746            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31747                enum_type: "VideoStreamType",
31748                value: tmp as u32,
31749            })?;
31750        let mut tmp = [0_u8; 32usize];
31751        for v in &mut tmp {
31752            *v = buf.get_u8();
31753        }
31754        __struct.name = CharArray::new(tmp);
31755        let mut tmp = [0_u8; 160usize];
31756        for v in &mut tmp {
31757            *v = buf.get_u8();
31758        }
31759        __struct.uri = CharArray::new(tmp);
31760        let tmp = buf.get_u8();
31761        __struct.encoding =
31762            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31763                enum_type: "VideoStreamEncoding",
31764                value: tmp as u32,
31765            })?;
31766        __struct.camera_device_id = buf.get_u8();
31767        Ok(__struct)
31768    }
31769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31770        let mut __tmp = BytesMut::new(bytes);
31771        #[allow(clippy::absurd_extreme_comparisons)]
31772        #[allow(unused_comparisons)]
31773        if __tmp.remaining() < Self::ENCODED_LEN {
31774            panic!(
31775                "buffer is too small (need {} bytes, but got {})",
31776                Self::ENCODED_LEN,
31777                __tmp.remaining(),
31778            )
31779        }
31780        __tmp.put_f32_le(self.framerate);
31781        __tmp.put_u32_le(self.bitrate);
31782        __tmp.put_u16_le(self.flags.bits());
31783        __tmp.put_u16_le(self.resolution_h);
31784        __tmp.put_u16_le(self.resolution_v);
31785        __tmp.put_u16_le(self.rotation);
31786        __tmp.put_u16_le(self.hfov);
31787        __tmp.put_u8(self.stream_id);
31788        __tmp.put_u8(self.count);
31789        __tmp.put_u8(self.mavtype as u8);
31790        for val in &self.name {
31791            __tmp.put_u8(*val);
31792        }
31793        for val in &self.uri {
31794            __tmp.put_u8(*val);
31795        }
31796        if matches!(version, MavlinkVersion::V2) {
31797            __tmp.put_u8(self.encoding as u8);
31798            __tmp.put_u8(self.camera_device_id);
31799            let len = __tmp.len();
31800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31801        } else {
31802            __tmp.len()
31803        }
31804    }
31805}
31806#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31807#[doc = ""]
31808#[doc = "ID: 270"]
31809#[derive(Debug, Clone, PartialEq)]
31810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31812#[cfg_attr(feature = "ts", derive(TS))]
31813#[cfg_attr(feature = "ts", ts(export))]
31814pub struct VIDEO_STREAM_STATUS_DATA {
31815    #[doc = "Frame rate"]
31816    pub framerate: f32,
31817    #[doc = "Bit rate"]
31818    pub bitrate: u32,
31819    #[doc = "Bitmap of stream status flags"]
31820    pub flags: VideoStreamStatusFlags,
31821    #[doc = "Horizontal resolution"]
31822    pub resolution_h: u16,
31823    #[doc = "Vertical resolution"]
31824    pub resolution_v: u16,
31825    #[doc = "Video image rotation clockwise"]
31826    pub rotation: u16,
31827    #[doc = "Horizontal Field of view"]
31828    pub hfov: u16,
31829    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31830    pub stream_id: u8,
31831    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31833    pub camera_device_id: u8,
31834}
31835impl VIDEO_STREAM_STATUS_DATA {
31836    pub const ENCODED_LEN: usize = 20usize;
31837    pub const DEFAULT: Self = Self {
31838        framerate: 0.0_f32,
31839        bitrate: 0_u32,
31840        flags: VideoStreamStatusFlags::DEFAULT,
31841        resolution_h: 0_u16,
31842        resolution_v: 0_u16,
31843        rotation: 0_u16,
31844        hfov: 0_u16,
31845        stream_id: 0_u8,
31846        camera_device_id: 0_u8,
31847    };
31848    #[cfg(feature = "arbitrary")]
31849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31850        use arbitrary::{Arbitrary, Unstructured};
31851        let mut buf = [0u8; 1024];
31852        rng.fill_bytes(&mut buf);
31853        let mut unstructured = Unstructured::new(&buf);
31854        Self::arbitrary(&mut unstructured).unwrap_or_default()
31855    }
31856}
31857impl Default for VIDEO_STREAM_STATUS_DATA {
31858    fn default() -> Self {
31859        Self::DEFAULT.clone()
31860    }
31861}
31862impl MessageData for VIDEO_STREAM_STATUS_DATA {
31863    type Message = MavMessage;
31864    const ID: u32 = 270u32;
31865    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31866    const EXTRA_CRC: u8 = 59u8;
31867    const ENCODED_LEN: usize = 20usize;
31868    fn deser(
31869        _version: MavlinkVersion,
31870        __input: &[u8],
31871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31872        let avail_len = __input.len();
31873        let mut payload_buf = [0; Self::ENCODED_LEN];
31874        let mut buf = if avail_len < Self::ENCODED_LEN {
31875            payload_buf[0..avail_len].copy_from_slice(__input);
31876            Bytes::new(&payload_buf)
31877        } else {
31878            Bytes::new(__input)
31879        };
31880        let mut __struct = Self::default();
31881        __struct.framerate = buf.get_f32_le();
31882        __struct.bitrate = buf.get_u32_le();
31883        let tmp = buf.get_u16_le();
31884        __struct.flags = VideoStreamStatusFlags::from_bits(
31885            tmp & VideoStreamStatusFlags::all().bits(),
31886        )
31887        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31888            flag_type: "VideoStreamStatusFlags",
31889            value: tmp as u32,
31890        })?;
31891        __struct.resolution_h = buf.get_u16_le();
31892        __struct.resolution_v = buf.get_u16_le();
31893        __struct.rotation = buf.get_u16_le();
31894        __struct.hfov = buf.get_u16_le();
31895        __struct.stream_id = buf.get_u8();
31896        __struct.camera_device_id = buf.get_u8();
31897        Ok(__struct)
31898    }
31899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31900        let mut __tmp = BytesMut::new(bytes);
31901        #[allow(clippy::absurd_extreme_comparisons)]
31902        #[allow(unused_comparisons)]
31903        if __tmp.remaining() < Self::ENCODED_LEN {
31904            panic!(
31905                "buffer is too small (need {} bytes, but got {})",
31906                Self::ENCODED_LEN,
31907                __tmp.remaining(),
31908            )
31909        }
31910        __tmp.put_f32_le(self.framerate);
31911        __tmp.put_u32_le(self.bitrate);
31912        __tmp.put_u16_le(self.flags.bits());
31913        __tmp.put_u16_le(self.resolution_h);
31914        __tmp.put_u16_le(self.resolution_v);
31915        __tmp.put_u16_le(self.rotation);
31916        __tmp.put_u16_le(self.hfov);
31917        __tmp.put_u8(self.stream_id);
31918        if matches!(version, MavlinkVersion::V2) {
31919            __tmp.put_u8(self.camera_device_id);
31920            let len = __tmp.len();
31921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31922        } else {
31923            __tmp.len()
31924        }
31925    }
31926}
31927#[doc = "Local position/attitude estimate from a vision source."]
31928#[doc = ""]
31929#[doc = "ID: 102"]
31930#[derive(Debug, Clone, PartialEq)]
31931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31933#[cfg_attr(feature = "ts", derive(TS))]
31934#[cfg_attr(feature = "ts", ts(export))]
31935pub struct VISION_POSITION_ESTIMATE_DATA {
31936    #[doc = "Timestamp (UNIX time or time since system boot)"]
31937    pub usec: u64,
31938    #[doc = "Local X position"]
31939    pub x: f32,
31940    #[doc = "Local Y position"]
31941    pub y: f32,
31942    #[doc = "Local Z position"]
31943    pub z: f32,
31944    #[doc = "Roll angle"]
31945    pub roll: f32,
31946    #[doc = "Pitch angle"]
31947    pub pitch: f32,
31948    #[doc = "Yaw angle"]
31949    pub yaw: f32,
31950    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31954    pub covariance: [f32; 21],
31955    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31957    pub reset_counter: u8,
31958}
31959impl VISION_POSITION_ESTIMATE_DATA {
31960    pub const ENCODED_LEN: usize = 117usize;
31961    pub const DEFAULT: Self = Self {
31962        usec: 0_u64,
31963        x: 0.0_f32,
31964        y: 0.0_f32,
31965        z: 0.0_f32,
31966        roll: 0.0_f32,
31967        pitch: 0.0_f32,
31968        yaw: 0.0_f32,
31969        covariance: [0.0_f32; 21usize],
31970        reset_counter: 0_u8,
31971    };
31972    #[cfg(feature = "arbitrary")]
31973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31974        use arbitrary::{Arbitrary, Unstructured};
31975        let mut buf = [0u8; 1024];
31976        rng.fill_bytes(&mut buf);
31977        let mut unstructured = Unstructured::new(&buf);
31978        Self::arbitrary(&mut unstructured).unwrap_or_default()
31979    }
31980}
31981impl Default for VISION_POSITION_ESTIMATE_DATA {
31982    fn default() -> Self {
31983        Self::DEFAULT.clone()
31984    }
31985}
31986impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31987    type Message = MavMessage;
31988    const ID: u32 = 102u32;
31989    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31990    const EXTRA_CRC: u8 = 158u8;
31991    const ENCODED_LEN: usize = 117usize;
31992    fn deser(
31993        _version: MavlinkVersion,
31994        __input: &[u8],
31995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31996        let avail_len = __input.len();
31997        let mut payload_buf = [0; Self::ENCODED_LEN];
31998        let mut buf = if avail_len < Self::ENCODED_LEN {
31999            payload_buf[0..avail_len].copy_from_slice(__input);
32000            Bytes::new(&payload_buf)
32001        } else {
32002            Bytes::new(__input)
32003        };
32004        let mut __struct = Self::default();
32005        __struct.usec = buf.get_u64_le();
32006        __struct.x = buf.get_f32_le();
32007        __struct.y = buf.get_f32_le();
32008        __struct.z = buf.get_f32_le();
32009        __struct.roll = buf.get_f32_le();
32010        __struct.pitch = buf.get_f32_le();
32011        __struct.yaw = buf.get_f32_le();
32012        for v in &mut __struct.covariance {
32013            let val = buf.get_f32_le();
32014            *v = val;
32015        }
32016        __struct.reset_counter = buf.get_u8();
32017        Ok(__struct)
32018    }
32019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32020        let mut __tmp = BytesMut::new(bytes);
32021        #[allow(clippy::absurd_extreme_comparisons)]
32022        #[allow(unused_comparisons)]
32023        if __tmp.remaining() < Self::ENCODED_LEN {
32024            panic!(
32025                "buffer is too small (need {} bytes, but got {})",
32026                Self::ENCODED_LEN,
32027                __tmp.remaining(),
32028            )
32029        }
32030        __tmp.put_u64_le(self.usec);
32031        __tmp.put_f32_le(self.x);
32032        __tmp.put_f32_le(self.y);
32033        __tmp.put_f32_le(self.z);
32034        __tmp.put_f32_le(self.roll);
32035        __tmp.put_f32_le(self.pitch);
32036        __tmp.put_f32_le(self.yaw);
32037        if matches!(version, MavlinkVersion::V2) {
32038            for val in &self.covariance {
32039                __tmp.put_f32_le(*val);
32040            }
32041            __tmp.put_u8(self.reset_counter);
32042            let len = __tmp.len();
32043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32044        } else {
32045            __tmp.len()
32046        }
32047    }
32048}
32049#[doc = "Speed estimate from a vision source."]
32050#[doc = ""]
32051#[doc = "ID: 103"]
32052#[derive(Debug, Clone, PartialEq)]
32053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32055#[cfg_attr(feature = "ts", derive(TS))]
32056#[cfg_attr(feature = "ts", ts(export))]
32057pub struct VISION_SPEED_ESTIMATE_DATA {
32058    #[doc = "Timestamp (UNIX time or time since system boot)"]
32059    pub usec: u64,
32060    #[doc = "Global X speed"]
32061    pub x: f32,
32062    #[doc = "Global Y speed"]
32063    pub y: f32,
32064    #[doc = "Global Z speed"]
32065    pub z: f32,
32066    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32067    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32069    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32070    pub covariance: [f32; 9],
32071    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32072    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32073    pub reset_counter: u8,
32074}
32075impl VISION_SPEED_ESTIMATE_DATA {
32076    pub const ENCODED_LEN: usize = 57usize;
32077    pub const DEFAULT: Self = Self {
32078        usec: 0_u64,
32079        x: 0.0_f32,
32080        y: 0.0_f32,
32081        z: 0.0_f32,
32082        covariance: [0.0_f32; 9usize],
32083        reset_counter: 0_u8,
32084    };
32085    #[cfg(feature = "arbitrary")]
32086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32087        use arbitrary::{Arbitrary, Unstructured};
32088        let mut buf = [0u8; 1024];
32089        rng.fill_bytes(&mut buf);
32090        let mut unstructured = Unstructured::new(&buf);
32091        Self::arbitrary(&mut unstructured).unwrap_or_default()
32092    }
32093}
32094impl Default for VISION_SPEED_ESTIMATE_DATA {
32095    fn default() -> Self {
32096        Self::DEFAULT.clone()
32097    }
32098}
32099impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32100    type Message = MavMessage;
32101    const ID: u32 = 103u32;
32102    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32103    const EXTRA_CRC: u8 = 208u8;
32104    const ENCODED_LEN: usize = 57usize;
32105    fn deser(
32106        _version: MavlinkVersion,
32107        __input: &[u8],
32108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32109        let avail_len = __input.len();
32110        let mut payload_buf = [0; Self::ENCODED_LEN];
32111        let mut buf = if avail_len < Self::ENCODED_LEN {
32112            payload_buf[0..avail_len].copy_from_slice(__input);
32113            Bytes::new(&payload_buf)
32114        } else {
32115            Bytes::new(__input)
32116        };
32117        let mut __struct = Self::default();
32118        __struct.usec = buf.get_u64_le();
32119        __struct.x = buf.get_f32_le();
32120        __struct.y = buf.get_f32_le();
32121        __struct.z = buf.get_f32_le();
32122        for v in &mut __struct.covariance {
32123            let val = buf.get_f32_le();
32124            *v = val;
32125        }
32126        __struct.reset_counter = buf.get_u8();
32127        Ok(__struct)
32128    }
32129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32130        let mut __tmp = BytesMut::new(bytes);
32131        #[allow(clippy::absurd_extreme_comparisons)]
32132        #[allow(unused_comparisons)]
32133        if __tmp.remaining() < Self::ENCODED_LEN {
32134            panic!(
32135                "buffer is too small (need {} bytes, but got {})",
32136                Self::ENCODED_LEN,
32137                __tmp.remaining(),
32138            )
32139        }
32140        __tmp.put_u64_le(self.usec);
32141        __tmp.put_f32_le(self.x);
32142        __tmp.put_f32_le(self.y);
32143        __tmp.put_f32_le(self.z);
32144        if matches!(version, MavlinkVersion::V2) {
32145            for val in &self.covariance {
32146                __tmp.put_f32_le(*val);
32147            }
32148            __tmp.put_u8(self.reset_counter);
32149            let len = __tmp.len();
32150            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32151        } else {
32152            __tmp.len()
32153        }
32154    }
32155}
32156#[doc = "Cumulative distance traveled for each reported wheel."]
32157#[doc = ""]
32158#[doc = "ID: 9000"]
32159#[derive(Debug, Clone, PartialEq)]
32160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32162#[cfg_attr(feature = "ts", derive(TS))]
32163#[cfg_attr(feature = "ts", ts(export))]
32164pub struct WHEEL_DISTANCE_DATA {
32165    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32166    pub time_usec: u64,
32167    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32168    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32169    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32170    pub distance: [f64; 16],
32171    #[doc = "Number of wheels reported."]
32172    pub count: u8,
32173}
32174impl WHEEL_DISTANCE_DATA {
32175    pub const ENCODED_LEN: usize = 137usize;
32176    pub const DEFAULT: Self = Self {
32177        time_usec: 0_u64,
32178        distance: [0.0_f64; 16usize],
32179        count: 0_u8,
32180    };
32181    #[cfg(feature = "arbitrary")]
32182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32183        use arbitrary::{Arbitrary, Unstructured};
32184        let mut buf = [0u8; 1024];
32185        rng.fill_bytes(&mut buf);
32186        let mut unstructured = Unstructured::new(&buf);
32187        Self::arbitrary(&mut unstructured).unwrap_or_default()
32188    }
32189}
32190impl Default for WHEEL_DISTANCE_DATA {
32191    fn default() -> Self {
32192        Self::DEFAULT.clone()
32193    }
32194}
32195impl MessageData for WHEEL_DISTANCE_DATA {
32196    type Message = MavMessage;
32197    const ID: u32 = 9000u32;
32198    const NAME: &'static str = "WHEEL_DISTANCE";
32199    const EXTRA_CRC: u8 = 113u8;
32200    const ENCODED_LEN: usize = 137usize;
32201    fn deser(
32202        _version: MavlinkVersion,
32203        __input: &[u8],
32204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32205        let avail_len = __input.len();
32206        let mut payload_buf = [0; Self::ENCODED_LEN];
32207        let mut buf = if avail_len < Self::ENCODED_LEN {
32208            payload_buf[0..avail_len].copy_from_slice(__input);
32209            Bytes::new(&payload_buf)
32210        } else {
32211            Bytes::new(__input)
32212        };
32213        let mut __struct = Self::default();
32214        __struct.time_usec = buf.get_u64_le();
32215        for v in &mut __struct.distance {
32216            let val = buf.get_f64_le();
32217            *v = val;
32218        }
32219        __struct.count = buf.get_u8();
32220        Ok(__struct)
32221    }
32222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32223        let mut __tmp = BytesMut::new(bytes);
32224        #[allow(clippy::absurd_extreme_comparisons)]
32225        #[allow(unused_comparisons)]
32226        if __tmp.remaining() < Self::ENCODED_LEN {
32227            panic!(
32228                "buffer is too small (need {} bytes, but got {})",
32229                Self::ENCODED_LEN,
32230                __tmp.remaining(),
32231            )
32232        }
32233        __tmp.put_u64_le(self.time_usec);
32234        for val in &self.distance {
32235            __tmp.put_f64_le(*val);
32236        }
32237        __tmp.put_u8(self.count);
32238        if matches!(version, MavlinkVersion::V2) {
32239            let len = __tmp.len();
32240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32241        } else {
32242            __tmp.len()
32243        }
32244    }
32245}
32246#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32247#[doc = ""]
32248#[doc = "ID: 299"]
32249#[derive(Debug, Clone, PartialEq)]
32250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32252#[cfg_attr(feature = "ts", derive(TS))]
32253#[cfg_attr(feature = "ts", ts(export))]
32254pub struct WIFI_CONFIG_AP_DATA {
32255    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32256    #[cfg_attr(feature = "ts", ts(type = "string"))]
32257    pub ssid: CharArray<32>,
32258    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32259    #[cfg_attr(feature = "ts", ts(type = "string"))]
32260    pub password: CharArray<64>,
32261    #[doc = "WiFi Mode."]
32262    #[cfg_attr(feature = "serde", serde(default))]
32263    pub mode: WifiConfigApMode,
32264    #[doc = "Message acceptance response (sent back to GS)."]
32265    #[cfg_attr(feature = "serde", serde(default))]
32266    pub response: WifiConfigApResponse,
32267}
32268impl WIFI_CONFIG_AP_DATA {
32269    pub const ENCODED_LEN: usize = 98usize;
32270    pub const DEFAULT: Self = Self {
32271        ssid: CharArray::new([0_u8; 32usize]),
32272        password: CharArray::new([0_u8; 64usize]),
32273        mode: WifiConfigApMode::DEFAULT,
32274        response: WifiConfigApResponse::DEFAULT,
32275    };
32276    #[cfg(feature = "arbitrary")]
32277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32278        use arbitrary::{Arbitrary, Unstructured};
32279        let mut buf = [0u8; 1024];
32280        rng.fill_bytes(&mut buf);
32281        let mut unstructured = Unstructured::new(&buf);
32282        Self::arbitrary(&mut unstructured).unwrap_or_default()
32283    }
32284}
32285impl Default for WIFI_CONFIG_AP_DATA {
32286    fn default() -> Self {
32287        Self::DEFAULT.clone()
32288    }
32289}
32290impl MessageData for WIFI_CONFIG_AP_DATA {
32291    type Message = MavMessage;
32292    const ID: u32 = 299u32;
32293    const NAME: &'static str = "WIFI_CONFIG_AP";
32294    const EXTRA_CRC: u8 = 19u8;
32295    const ENCODED_LEN: usize = 98usize;
32296    fn deser(
32297        _version: MavlinkVersion,
32298        __input: &[u8],
32299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32300        let avail_len = __input.len();
32301        let mut payload_buf = [0; Self::ENCODED_LEN];
32302        let mut buf = if avail_len < Self::ENCODED_LEN {
32303            payload_buf[0..avail_len].copy_from_slice(__input);
32304            Bytes::new(&payload_buf)
32305        } else {
32306            Bytes::new(__input)
32307        };
32308        let mut __struct = Self::default();
32309        let mut tmp = [0_u8; 32usize];
32310        for v in &mut tmp {
32311            *v = buf.get_u8();
32312        }
32313        __struct.ssid = CharArray::new(tmp);
32314        let mut tmp = [0_u8; 64usize];
32315        for v in &mut tmp {
32316            *v = buf.get_u8();
32317        }
32318        __struct.password = CharArray::new(tmp);
32319        let tmp = buf.get_i8();
32320        __struct.mode =
32321            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32322                enum_type: "WifiConfigApMode",
32323                value: tmp as u32,
32324            })?;
32325        let tmp = buf.get_i8();
32326        __struct.response =
32327            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32328                enum_type: "WifiConfigApResponse",
32329                value: tmp as u32,
32330            })?;
32331        Ok(__struct)
32332    }
32333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32334        let mut __tmp = BytesMut::new(bytes);
32335        #[allow(clippy::absurd_extreme_comparisons)]
32336        #[allow(unused_comparisons)]
32337        if __tmp.remaining() < Self::ENCODED_LEN {
32338            panic!(
32339                "buffer is too small (need {} bytes, but got {})",
32340                Self::ENCODED_LEN,
32341                __tmp.remaining(),
32342            )
32343        }
32344        for val in &self.ssid {
32345            __tmp.put_u8(*val);
32346        }
32347        for val in &self.password {
32348            __tmp.put_u8(*val);
32349        }
32350        if matches!(version, MavlinkVersion::V2) {
32351            __tmp.put_i8(self.mode as i8);
32352            __tmp.put_i8(self.response as i8);
32353            let len = __tmp.len();
32354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32355        } else {
32356            __tmp.len()
32357        }
32358    }
32359}
32360#[doc = "Winch status."]
32361#[doc = ""]
32362#[doc = "ID: 9005"]
32363#[derive(Debug, Clone, PartialEq)]
32364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32366#[cfg_attr(feature = "ts", derive(TS))]
32367#[cfg_attr(feature = "ts", ts(export))]
32368pub struct WINCH_STATUS_DATA {
32369    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32370    pub time_usec: u64,
32371    #[doc = "Length of line released. NaN if unknown"]
32372    pub line_length: f32,
32373    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32374    pub speed: f32,
32375    #[doc = "Tension on the line. NaN if unknown"]
32376    pub tension: f32,
32377    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32378    pub voltage: f32,
32379    #[doc = "Current draw from the winch. NaN if unknown"]
32380    pub current: f32,
32381    #[doc = "Status flags"]
32382    pub status: MavWinchStatusFlag,
32383    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32384    pub temperature: i16,
32385}
32386impl WINCH_STATUS_DATA {
32387    pub const ENCODED_LEN: usize = 34usize;
32388    pub const DEFAULT: Self = Self {
32389        time_usec: 0_u64,
32390        line_length: 0.0_f32,
32391        speed: 0.0_f32,
32392        tension: 0.0_f32,
32393        voltage: 0.0_f32,
32394        current: 0.0_f32,
32395        status: MavWinchStatusFlag::DEFAULT,
32396        temperature: 0_i16,
32397    };
32398    #[cfg(feature = "arbitrary")]
32399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32400        use arbitrary::{Arbitrary, Unstructured};
32401        let mut buf = [0u8; 1024];
32402        rng.fill_bytes(&mut buf);
32403        let mut unstructured = Unstructured::new(&buf);
32404        Self::arbitrary(&mut unstructured).unwrap_or_default()
32405    }
32406}
32407impl Default for WINCH_STATUS_DATA {
32408    fn default() -> Self {
32409        Self::DEFAULT.clone()
32410    }
32411}
32412impl MessageData for WINCH_STATUS_DATA {
32413    type Message = MavMessage;
32414    const ID: u32 = 9005u32;
32415    const NAME: &'static str = "WINCH_STATUS";
32416    const EXTRA_CRC: u8 = 117u8;
32417    const ENCODED_LEN: usize = 34usize;
32418    fn deser(
32419        _version: MavlinkVersion,
32420        __input: &[u8],
32421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32422        let avail_len = __input.len();
32423        let mut payload_buf = [0; Self::ENCODED_LEN];
32424        let mut buf = if avail_len < Self::ENCODED_LEN {
32425            payload_buf[0..avail_len].copy_from_slice(__input);
32426            Bytes::new(&payload_buf)
32427        } else {
32428            Bytes::new(__input)
32429        };
32430        let mut __struct = Self::default();
32431        __struct.time_usec = buf.get_u64_le();
32432        __struct.line_length = buf.get_f32_le();
32433        __struct.speed = buf.get_f32_le();
32434        __struct.tension = buf.get_f32_le();
32435        __struct.voltage = buf.get_f32_le();
32436        __struct.current = buf.get_f32_le();
32437        let tmp = buf.get_u32_le();
32438        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
32439            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32440                flag_type: "MavWinchStatusFlag",
32441                value: tmp as u32,
32442            })?;
32443        __struct.temperature = buf.get_i16_le();
32444        Ok(__struct)
32445    }
32446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32447        let mut __tmp = BytesMut::new(bytes);
32448        #[allow(clippy::absurd_extreme_comparisons)]
32449        #[allow(unused_comparisons)]
32450        if __tmp.remaining() < Self::ENCODED_LEN {
32451            panic!(
32452                "buffer is too small (need {} bytes, but got {})",
32453                Self::ENCODED_LEN,
32454                __tmp.remaining(),
32455            )
32456        }
32457        __tmp.put_u64_le(self.time_usec);
32458        __tmp.put_f32_le(self.line_length);
32459        __tmp.put_f32_le(self.speed);
32460        __tmp.put_f32_le(self.tension);
32461        __tmp.put_f32_le(self.voltage);
32462        __tmp.put_f32_le(self.current);
32463        __tmp.put_u32_le(self.status.bits());
32464        __tmp.put_i16_le(self.temperature);
32465        if matches!(version, MavlinkVersion::V2) {
32466            let len = __tmp.len();
32467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32468        } else {
32469            __tmp.len()
32470        }
32471    }
32472}
32473#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32474#[doc = ""]
32475#[doc = "ID: 231"]
32476#[derive(Debug, Clone, PartialEq)]
32477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32479#[cfg_attr(feature = "ts", derive(TS))]
32480#[cfg_attr(feature = "ts", ts(export))]
32481pub struct WIND_COV_DATA {
32482    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32483    pub time_usec: u64,
32484    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32485    pub wind_x: f32,
32486    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32487    pub wind_y: f32,
32488    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32489    pub wind_z: f32,
32490    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32491    pub var_horiz: f32,
32492    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32493    pub var_vert: f32,
32494    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32495    pub wind_alt: f32,
32496    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32497    pub horiz_accuracy: f32,
32498    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32499    pub vert_accuracy: f32,
32500}
32501impl WIND_COV_DATA {
32502    pub const ENCODED_LEN: usize = 40usize;
32503    pub const DEFAULT: Self = Self {
32504        time_usec: 0_u64,
32505        wind_x: 0.0_f32,
32506        wind_y: 0.0_f32,
32507        wind_z: 0.0_f32,
32508        var_horiz: 0.0_f32,
32509        var_vert: 0.0_f32,
32510        wind_alt: 0.0_f32,
32511        horiz_accuracy: 0.0_f32,
32512        vert_accuracy: 0.0_f32,
32513    };
32514    #[cfg(feature = "arbitrary")]
32515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32516        use arbitrary::{Arbitrary, Unstructured};
32517        let mut buf = [0u8; 1024];
32518        rng.fill_bytes(&mut buf);
32519        let mut unstructured = Unstructured::new(&buf);
32520        Self::arbitrary(&mut unstructured).unwrap_or_default()
32521    }
32522}
32523impl Default for WIND_COV_DATA {
32524    fn default() -> Self {
32525        Self::DEFAULT.clone()
32526    }
32527}
32528impl MessageData for WIND_COV_DATA {
32529    type Message = MavMessage;
32530    const ID: u32 = 231u32;
32531    const NAME: &'static str = "WIND_COV";
32532    const EXTRA_CRC: u8 = 105u8;
32533    const ENCODED_LEN: usize = 40usize;
32534    fn deser(
32535        _version: MavlinkVersion,
32536        __input: &[u8],
32537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32538        let avail_len = __input.len();
32539        let mut payload_buf = [0; Self::ENCODED_LEN];
32540        let mut buf = if avail_len < Self::ENCODED_LEN {
32541            payload_buf[0..avail_len].copy_from_slice(__input);
32542            Bytes::new(&payload_buf)
32543        } else {
32544            Bytes::new(__input)
32545        };
32546        let mut __struct = Self::default();
32547        __struct.time_usec = buf.get_u64_le();
32548        __struct.wind_x = buf.get_f32_le();
32549        __struct.wind_y = buf.get_f32_le();
32550        __struct.wind_z = buf.get_f32_le();
32551        __struct.var_horiz = buf.get_f32_le();
32552        __struct.var_vert = buf.get_f32_le();
32553        __struct.wind_alt = buf.get_f32_le();
32554        __struct.horiz_accuracy = buf.get_f32_le();
32555        __struct.vert_accuracy = buf.get_f32_le();
32556        Ok(__struct)
32557    }
32558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32559        let mut __tmp = BytesMut::new(bytes);
32560        #[allow(clippy::absurd_extreme_comparisons)]
32561        #[allow(unused_comparisons)]
32562        if __tmp.remaining() < Self::ENCODED_LEN {
32563            panic!(
32564                "buffer is too small (need {} bytes, but got {})",
32565                Self::ENCODED_LEN,
32566                __tmp.remaining(),
32567            )
32568        }
32569        __tmp.put_u64_le(self.time_usec);
32570        __tmp.put_f32_le(self.wind_x);
32571        __tmp.put_f32_le(self.wind_y);
32572        __tmp.put_f32_le(self.wind_z);
32573        __tmp.put_f32_le(self.var_horiz);
32574        __tmp.put_f32_le(self.var_vert);
32575        __tmp.put_f32_le(self.wind_alt);
32576        __tmp.put_f32_le(self.horiz_accuracy);
32577        __tmp.put_f32_le(self.vert_accuracy);
32578        if matches!(version, MavlinkVersion::V2) {
32579            let len = __tmp.len();
32580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32581        } else {
32582            __tmp.len()
32583        }
32584    }
32585}
32586#[derive(Clone, PartialEq, Debug)]
32587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32588#[cfg_attr(feature = "serde", serde(tag = "type"))]
32589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32590#[cfg_attr(feature = "ts", derive(TS))]
32591#[cfg_attr(feature = "ts", ts(export))]
32592#[repr(u32)]
32593pub enum MavMessage {
32594    #[doc = "Set the vehicle attitude and body angular rates."]
32595    #[doc = ""]
32596    #[doc = "ID: 140"]
32597    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32598    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32599    #[doc = ""]
32600    #[doc = "ID: 375"]
32601    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32602    #[doc = "The location and information of an ADSB vehicle."]
32603    #[doc = ""]
32604    #[doc = "ID: 246"]
32605    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32606    #[doc = "The location and information of an AIS vessel."]
32607    #[doc = ""]
32608    #[doc = "ID: 301"]
32609    AIS_VESSEL(AIS_VESSEL_DATA),
32610    #[doc = "The current system altitude."]
32611    #[doc = ""]
32612    #[doc = "ID: 141"]
32613    ALTITUDE(ALTITUDE_DATA),
32614    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32615    #[doc = ""]
32616    #[doc = "ID: 30"]
32617    ATTITUDE(ATTITUDE_DATA),
32618    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32619    #[doc = ""]
32620    #[doc = "ID: 31"]
32621    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32622    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32623    #[doc = ""]
32624    #[doc = "ID: 61"]
32625    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32626    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32627    #[doc = ""]
32628    #[doc = "ID: 83"]
32629    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32630    #[doc = "Motion capture attitude and position."]
32631    #[doc = ""]
32632    #[doc = "ID: 138"]
32633    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32634    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32635    #[doc = ""]
32636    #[doc = "ID: 7"]
32637    AUTH_KEY(AUTH_KEY_DATA),
32638    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32639    #[doc = ""]
32640    #[doc = "ID: 286"]
32641    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32642    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32643    #[doc = ""]
32644    #[doc = "ID: 148"]
32645    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32646    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32647    #[doc = ""]
32648    #[doc = "ID: 435"]
32649    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32650    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32651    #[doc = ""]
32652    #[doc = "ID: 437"]
32653    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32654    #[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32655    #[doc = ""]
32656    #[doc = "ID: 60052"]
32657    AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA),
32658    #[doc = "Drone operation mode."]
32659    #[doc = ""]
32660    #[doc = "ID: 60053"]
32661    AVSS_DRONE_OPERATION_MODE(AVSS_DRONE_OPERATION_MODE_DATA),
32662    #[doc = "Drone position."]
32663    #[doc = ""]
32664    #[doc = "ID: 60051"]
32665    AVSS_DRONE_POSITION(AVSS_DRONE_POSITION_DATA),
32666    #[doc = "AVSS PRS system status."]
32667    #[doc = ""]
32668    #[doc = "ID: 60050"]
32669    AVSS_PRS_SYS_STATUS(AVSS_PRS_SYS_STATUS_DATA),
32670    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32671    #[doc = ""]
32672    #[doc = "ID: 372"]
32673    BATTERY_INFO(BATTERY_INFO_DATA),
32674    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32675    #[doc = ""]
32676    #[doc = "ID: 147"]
32677    BATTERY_STATUS(BATTERY_STATUS_DATA),
32678    #[doc = "Report button state change."]
32679    #[doc = ""]
32680    #[doc = "ID: 257"]
32681    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32682    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32683    #[doc = ""]
32684    #[doc = "ID: 262"]
32685    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32686    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32687    #[doc = ""]
32688    #[doc = "ID: 271"]
32689    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32690    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32691    #[doc = ""]
32692    #[doc = "ID: 263"]
32693    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32694    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32695    #[doc = ""]
32696    #[doc = "ID: 259"]
32697    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32698    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32699    #[doc = ""]
32700    #[doc = "ID: 260"]
32701    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32702    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32703    #[doc = ""]
32704    #[doc = "ID: 277"]
32705    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32706    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32707    #[doc = ""]
32708    #[doc = "ID: 276"]
32709    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32710    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32711    #[doc = ""]
32712    #[doc = "ID: 275"]
32713    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32714    #[doc = "Camera-IMU triggering and synchronisation message."]
32715    #[doc = ""]
32716    #[doc = "ID: 112"]
32717    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32718    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32719    #[doc = ""]
32720    #[doc = "ID: 387"]
32721    CANFD_FRAME(CANFD_FRAME_DATA),
32722    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32723    #[doc = ""]
32724    #[doc = "ID: 388"]
32725    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32726    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32727    #[doc = ""]
32728    #[doc = "ID: 386"]
32729    CAN_FRAME(CAN_FRAME_DATA),
32730    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32731    #[doc = ""]
32732    #[doc = "ID: 336"]
32733    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32734    #[doc = "Report current used cellular network status."]
32735    #[doc = ""]
32736    #[doc = "ID: 334"]
32737    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32738    #[doc = "Request to control this MAV."]
32739    #[doc = ""]
32740    #[doc = "ID: 5"]
32741    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32742    #[doc = "Accept / deny control of this MAV."]
32743    #[doc = ""]
32744    #[doc = "ID: 6"]
32745    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32746    #[doc = "Information about a potential collision."]
32747    #[doc = ""]
32748    #[doc = "ID: 247"]
32749    COLLISION(COLLISION_DATA),
32750    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32751    #[doc = ""]
32752    #[doc = "ID: 77"]
32753    COMMAND_ACK(COMMAND_ACK_DATA),
32754    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32755    #[doc = ""]
32756    #[doc = "ID: 80"]
32757    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32758    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32759    #[doc = ""]
32760    #[doc = "ID: 75"]
32761    COMMAND_INT(COMMAND_INT_DATA),
32762    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32763    #[doc = ""]
32764    #[doc = "ID: 76"]
32765    COMMAND_LONG(COMMAND_LONG_DATA),
32766    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32767    #[doc = ""]
32768    #[doc = "ID: 395"]
32769    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32770    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32771    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32772    #[doc = ""]
32773    #[doc = "ID: 396"]
32774    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32775    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32776    #[doc = ""]
32777    #[doc = "ID: 397"]
32778    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32779    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32780    #[doc = ""]
32781    #[doc = "ID: 146"]
32782    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32783    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32784    #[doc = ""]
32785    #[doc = "ID: 411"]
32786    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32787    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32788    #[doc = ""]
32789    #[doc = "ID: 436"]
32790    CURRENT_MODE(CURRENT_MODE_DATA),
32791    #[doc = "Data stream status information."]
32792    #[doc = ""]
32793    #[doc = "ID: 67"]
32794    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32795    DATA_STREAM(DATA_STREAM_DATA),
32796    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32797    #[doc = ""]
32798    #[doc = "ID: 130"]
32799    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32800    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32801    #[doc = ""]
32802    #[doc = "ID: 254"]
32803    DEBUG(DEBUG_DATA),
32804    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32805    #[doc = ""]
32806    #[doc = "ID: 350"]
32807    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32808    #[doc = "To debug something using a named 3D vector."]
32809    #[doc = ""]
32810    #[doc = "ID: 250"]
32811    DEBUG_VECT(DEBUG_VECT_DATA),
32812    #[doc = "Distance sensor information for an onboard rangefinder."]
32813    #[doc = ""]
32814    #[doc = "ID: 132"]
32815    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32816    #[doc = "EFI status output."]
32817    #[doc = ""]
32818    #[doc = "ID: 225"]
32819    EFI_STATUS(EFI_STATUS_DATA),
32820    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32821    #[doc = ""]
32822    #[doc = "ID: 131"]
32823    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32824    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32825    #[doc = ""]
32826    #[doc = "ID: 290"]
32827    ESC_INFO(ESC_INFO_DATA),
32828    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32829    #[doc = ""]
32830    #[doc = "ID: 291"]
32831    ESC_STATUS(ESC_STATUS_DATA),
32832    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32833    #[doc = ""]
32834    #[doc = "ID: 230"]
32835    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32836    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32837    #[doc = ""]
32838    #[doc = "ID: 410"]
32839    EVENT(EVENT_DATA),
32840    #[doc = "Provides state for additional features."]
32841    #[doc = ""]
32842    #[doc = "ID: 245"]
32843    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32844    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32845    #[doc = ""]
32846    #[doc = "ID: 162"]
32847    FENCE_STATUS(FENCE_STATUS_DATA),
32848    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32849    #[doc = ""]
32850    #[doc = "ID: 110"]
32851    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32852    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32853    #[doc = ""]
32854    #[doc = "ID: 264"]
32855    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32856    #[doc = "Current motion information from a designated system."]
32857    #[doc = ""]
32858    #[doc = "ID: 144"]
32859    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32860    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32861    #[doc = ""]
32862    #[doc = "ID: 371"]
32863    FUEL_STATUS(FUEL_STATUS_DATA),
32864    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32865    #[doc = ""]
32866    #[doc = "ID: 373"]
32867    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32868    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32869    #[doc = ""]
32870    #[doc = "ID: 285"]
32871    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32872    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32873    #[doc = ""]
32874    #[doc = "ID: 283"]
32875    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32876    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32877    #[doc = ""]
32878    #[doc = "ID: 284"]
32879    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32880    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32881    #[doc = ""]
32882    #[doc = "ID: 280"]
32883    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32884    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32885    #[doc = ""]
32886    #[doc = "ID: 282"]
32887    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32888    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32889    #[doc = ""]
32890    #[doc = "ID: 288"]
32891    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32892    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32893    #[doc = ""]
32894    #[doc = "ID: 287"]
32895    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32896    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32897    #[doc = ""]
32898    #[doc = "ID: 281"]
32899    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32900    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32901    #[doc = ""]
32902    #[doc = "ID: 33"]
32903    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32904    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32905    #[doc = ""]
32906    #[doc = "ID: 63"]
32907    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32908    #[doc = "Global position/attitude estimate from a vision source."]
32909    #[doc = ""]
32910    #[doc = "ID: 101"]
32911    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32912    #[doc = "Second GPS data."]
32913    #[doc = ""]
32914    #[doc = "ID: 124"]
32915    GPS2_RAW(GPS2_RAW_DATA),
32916    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32917    #[doc = ""]
32918    #[doc = "ID: 128"]
32919    GPS2_RTK(GPS2_RTK_DATA),
32920    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32921    #[doc = ""]
32922    #[doc = "ID: 49"]
32923    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32924    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32925    #[doc = ""]
32926    #[doc = "ID: 123"]
32927    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32928    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32929    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32930    #[doc = ""]
32931    #[doc = "ID: 232"]
32932    GPS_INPUT(GPS_INPUT_DATA),
32933    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32934    #[doc = ""]
32935    #[doc = "ID: 24"]
32936    GPS_RAW_INT(GPS_RAW_INT_DATA),
32937    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32938    #[doc = ""]
32939    #[doc = "ID: 233"]
32940    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32941    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32942    #[doc = ""]
32943    #[doc = "ID: 127"]
32944    GPS_RTK(GPS_RTK_DATA),
32945    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32946    #[doc = ""]
32947    #[doc = "ID: 25"]
32948    GPS_STATUS(GPS_STATUS_DATA),
32949    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32950    #[doc = ""]
32951    #[doc = "ID: 0"]
32952    HEARTBEAT(HEARTBEAT_DATA),
32953    #[doc = "The IMU readings in SI units in NED body frame."]
32954    #[doc = ""]
32955    #[doc = "ID: 105"]
32956    HIGHRES_IMU(HIGHRES_IMU_DATA),
32957    #[doc = "Message appropriate for high latency connections like Iridium."]
32958    #[doc = ""]
32959    #[doc = "ID: 234"]
32960    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32961    HIGH_LATENCY(HIGH_LATENCY_DATA),
32962    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32963    #[doc = ""]
32964    #[doc = "ID: 235"]
32965    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32966    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32967    #[doc = ""]
32968    #[doc = "ID: 93"]
32969    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32970    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32971    #[doc = ""]
32972    #[doc = "ID: 91"]
32973    HIL_CONTROLS(HIL_CONTROLS_DATA),
32974    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32975    #[doc = ""]
32976    #[doc = "ID: 113"]
32977    HIL_GPS(HIL_GPS_DATA),
32978    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32979    #[doc = ""]
32980    #[doc = "ID: 114"]
32981    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32982    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32983    #[doc = ""]
32984    #[doc = "ID: 92"]
32985    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32986    #[doc = "The IMU readings in SI units in NED body frame."]
32987    #[doc = ""]
32988    #[doc = "ID: 107"]
32989    HIL_SENSOR(HIL_SENSOR_DATA),
32990    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32991    #[doc = ""]
32992    #[doc = "ID: 90"]
32993    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32994    HIL_STATE(HIL_STATE_DATA),
32995    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32996    #[doc = ""]
32997    #[doc = "ID: 115"]
32998    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32999    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
33000    #[doc = ""]
33001    #[doc = "ID: 242"]
33002    HOME_POSITION(HOME_POSITION_DATA),
33003    #[doc = "Temperature and humidity from hygrometer."]
33004    #[doc = ""]
33005    #[doc = "ID: 12920"]
33006    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33007    #[doc = "Illuminator status."]
33008    #[doc = ""]
33009    #[doc = "ID: 440"]
33010    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33011    #[doc = "Status of the Iridium SBD link."]
33012    #[doc = ""]
33013    #[doc = "ID: 335"]
33014    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33015    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33016    #[doc = ""]
33017    #[doc = "ID: 149"]
33018    LANDING_TARGET(LANDING_TARGET_DATA),
33019    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33020    #[doc = ""]
33021    #[doc = "ID: 8"]
33022    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33023    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33024    #[doc = ""]
33025    #[doc = "ID: 32"]
33026    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33027    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33028    #[doc = ""]
33029    #[doc = "ID: 64"]
33030    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33031    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33032    #[doc = ""]
33033    #[doc = "ID: 89"]
33034    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33035    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33036    #[doc = ""]
33037    #[doc = "ID: 268"]
33038    LOGGING_ACK(LOGGING_ACK_DATA),
33039    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33040    #[doc = ""]
33041    #[doc = "ID: 266"]
33042    LOGGING_DATA(LOGGING_DATA_DATA),
33043    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33044    #[doc = ""]
33045    #[doc = "ID: 267"]
33046    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33047    #[doc = "Reply to LOG_REQUEST_DATA."]
33048    #[doc = ""]
33049    #[doc = "ID: 120"]
33050    LOG_DATA(LOG_DATA_DATA),
33051    #[doc = "Reply to LOG_REQUEST_LIST."]
33052    #[doc = ""]
33053    #[doc = "ID: 118"]
33054    LOG_ENTRY(LOG_ENTRY_DATA),
33055    #[doc = "Erase all logs."]
33056    #[doc = ""]
33057    #[doc = "ID: 121"]
33058    LOG_ERASE(LOG_ERASE_DATA),
33059    #[doc = "Request a chunk of a log."]
33060    #[doc = ""]
33061    #[doc = "ID: 119"]
33062    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33063    #[doc = "Stop log transfer and resume normal logging."]
33064    #[doc = ""]
33065    #[doc = "ID: 122"]
33066    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33067    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33068    #[doc = ""]
33069    #[doc = "ID: 117"]
33070    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33071    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33072    #[doc = ""]
33073    #[doc = "ID: 192"]
33074    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33075    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33076    #[doc = ""]
33077    #[doc = "ID: 69"]
33078    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33079    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33080    #[doc = ""]
33081    #[doc = "ID: 81"]
33082    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33083    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33084    #[doc = ""]
33085    #[doc = "ID: 249"]
33086    MEMORY_VECT(MEMORY_VECT_DATA),
33087    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33088    #[doc = ""]
33089    #[doc = "ID: 244"]
33090    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33091    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33092    #[doc = ""]
33093    #[doc = "ID: 47"]
33094    MISSION_ACK(MISSION_ACK_DATA),
33095    #[doc = "Delete all mission items at once."]
33096    #[doc = ""]
33097    #[doc = "ID: 45"]
33098    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33099    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33100    #[doc = ""]
33101    #[doc = "ID: 44"]
33102    MISSION_COUNT(MISSION_COUNT_DATA),
33103    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33104    #[doc = ""]
33105    #[doc = "ID: 42"]
33106    MISSION_CURRENT(MISSION_CURRENT_DATA),
33107    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33108    #[doc = ""]
33109    #[doc = "ID: 39"]
33110    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33111    MISSION_ITEM(MISSION_ITEM_DATA),
33112    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33113    #[doc = ""]
33114    #[doc = "ID: 73"]
33115    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33116    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33117    #[doc = ""]
33118    #[doc = "ID: 46"]
33119    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33120    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33121    #[doc = ""]
33122    #[doc = "ID: 40"]
33123    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33124    MISSION_REQUEST(MISSION_REQUEST_DATA),
33125    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33126    #[doc = ""]
33127    #[doc = "ID: 51"]
33128    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33129    #[doc = "Request the overall list of mission items from the system/component."]
33130    #[doc = ""]
33131    #[doc = "ID: 43"]
33132    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33133    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33134    #[doc = ""]
33135    #[doc = "ID: 37"]
33136    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33137    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33138    #[doc = ""]
33139    #[doc = "ID: 41"]
33140    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33141    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33142    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33143    #[doc = ""]
33144    #[doc = "ID: 38"]
33145    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33146    #[doc = "Orientation of a mount."]
33147    #[doc = ""]
33148    #[doc = "ID: 265"]
33149    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33150    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33151    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33152    #[doc = ""]
33153    #[doc = "ID: 251"]
33154    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33155    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33156    #[doc = ""]
33157    #[doc = "ID: 252"]
33158    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33159    #[doc = "The state of the navigation and position controller."]
33160    #[doc = ""]
33161    #[doc = "ID: 62"]
33162    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33163    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33164    #[doc = ""]
33165    #[doc = "ID: 330"]
33166    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33167    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33168    #[doc = ""]
33169    #[doc = "ID: 331"]
33170    ODOMETRY(ODOMETRY_DATA),
33171    #[doc = "Hardware status sent by an onboard computer."]
33172    #[doc = ""]
33173    #[doc = "ID: 390"]
33174    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33175    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33176    #[doc = ""]
33177    #[doc = "ID: 12918"]
33178    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33179    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33180    #[doc = ""]
33181    #[doc = "ID: 12902"]
33182    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33183    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33184    #[doc = ""]
33185    #[doc = "ID: 12900"]
33186    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33187    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33188    #[doc = ""]
33189    #[doc = "ID: 12901"]
33190    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33191    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33192    #[doc = ""]
33193    #[doc = "ID: 12915"]
33194    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33195    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33196    #[doc = ""]
33197    #[doc = "ID: 12905"]
33198    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33199    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33200    #[doc = ""]
33201    #[doc = "ID: 12903"]
33202    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33203    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33204    #[doc = ""]
33205    #[doc = "ID: 12904"]
33206    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33207    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33208    #[doc = ""]
33209    #[doc = "ID: 12919"]
33210    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33211    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33212    #[doc = ""]
33213    #[doc = "ID: 100"]
33214    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33215    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33216    #[doc = ""]
33217    #[doc = "ID: 106"]
33218    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33219    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33220    #[doc = ""]
33221    #[doc = "ID: 360"]
33222    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33223    #[doc = "Response from a PARAM_EXT_SET message."]
33224    #[doc = ""]
33225    #[doc = "ID: 324"]
33226    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33227    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33228    #[doc = ""]
33229    #[doc = "ID: 321"]
33230    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33231    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33232    #[doc = ""]
33233    #[doc = "ID: 320"]
33234    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33235    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33236    #[doc = ""]
33237    #[doc = "ID: 323"]
33238    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33239    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33240    #[doc = ""]
33241    #[doc = "ID: 322"]
33242    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33243    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33244    #[doc = ""]
33245    #[doc = "ID: 50"]
33246    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33247    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33248    #[doc = ""]
33249    #[doc = "ID: 21"]
33250    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33251    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33252    #[doc = ""]
33253    #[doc = "ID: 20"]
33254    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33255    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33256    #[doc = ""]
33257    #[doc = "ID: 23"]
33258    PARAM_SET(PARAM_SET_DATA),
33259    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33260    #[doc = ""]
33261    #[doc = "ID: 22"]
33262    PARAM_VALUE(PARAM_VALUE_DATA),
33263    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33264    #[doc = ""]
33265    #[doc = "ID: 4"]
33266    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33267    PING(PING_DATA),
33268    #[doc = "Control vehicle tone generation (buzzer)."]
33269    #[doc = ""]
33270    #[doc = "ID: 258"]
33271    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33272    PLAY_TUNE(PLAY_TUNE_DATA),
33273    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33274    #[doc = ""]
33275    #[doc = "ID: 400"]
33276    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33277    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33278    #[doc = ""]
33279    #[doc = "ID: 87"]
33280    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33281    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33282    #[doc = ""]
33283    #[doc = "ID: 85"]
33284    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33285    #[doc = "Power supply status."]
33286    #[doc = ""]
33287    #[doc = "ID: 125"]
33288    POWER_STATUS(POWER_STATUS_DATA),
33289    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33290    #[doc = ""]
33291    #[doc = "ID: 300"]
33292    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33293    #[doc = "Status generated by radio and injected into MAVLink stream."]
33294    #[doc = ""]
33295    #[doc = "ID: 109"]
33296    RADIO_STATUS(RADIO_STATUS_DATA),
33297    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33298    #[doc = ""]
33299    #[doc = "ID: 27"]
33300    RAW_IMU(RAW_IMU_DATA),
33301    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33302    #[doc = ""]
33303    #[doc = "ID: 28"]
33304    RAW_PRESSURE(RAW_PRESSURE_DATA),
33305    #[doc = "RPM sensor data message."]
33306    #[doc = ""]
33307    #[doc = "ID: 339"]
33308    RAW_RPM(RAW_RPM_DATA),
33309    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33310    #[doc = ""]
33311    #[doc = "ID: 65"]
33312    RC_CHANNELS(RC_CHANNELS_DATA),
33313    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33314    #[doc = ""]
33315    #[doc = "ID: 70"]
33316    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33317    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33318    #[doc = ""]
33319    #[doc = "ID: 35"]
33320    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33321    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33322    #[doc = ""]
33323    #[doc = "ID: 34"]
33324    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33325    #[doc = "Request a data stream."]
33326    #[doc = ""]
33327    #[doc = "ID: 66"]
33328    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33329    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33330    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33331    #[doc = ""]
33332    #[doc = "ID: 412"]
33333    REQUEST_EVENT(REQUEST_EVENT_DATA),
33334    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33335    #[doc = ""]
33336    #[doc = "ID: 142"]
33337    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33338    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33339    #[doc = ""]
33340    #[doc = "ID: 413"]
33341    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33342    #[doc = "Read out the safety zone the MAV currently assumes."]
33343    #[doc = ""]
33344    #[doc = "ID: 55"]
33345    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33346    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33347    #[doc = ""]
33348    #[doc = "ID: 54"]
33349    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33350    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33351    #[doc = ""]
33352    #[doc = "ID: 26"]
33353    SCALED_IMU(SCALED_IMU_DATA),
33354    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33355    #[doc = ""]
33356    #[doc = "ID: 116"]
33357    SCALED_IMU2(SCALED_IMU2_DATA),
33358    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33359    #[doc = ""]
33360    #[doc = "ID: 129"]
33361    SCALED_IMU3(SCALED_IMU3_DATA),
33362    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33363    #[doc = ""]
33364    #[doc = "ID: 29"]
33365    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33366    #[doc = "Barometer readings for 2nd barometer."]
33367    #[doc = ""]
33368    #[doc = "ID: 137"]
33369    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33370    #[doc = "Barometer readings for 3rd barometer."]
33371    #[doc = ""]
33372    #[doc = "ID: 143"]
33373    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33374    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33375    #[doc = ""]
33376    #[doc = "ID: 126"]
33377    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33378    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33379    #[doc = ""]
33380    #[doc = "ID: 36"]
33381    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33382    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33383    #[doc = ""]
33384    #[doc = "ID: 256"]
33385    SETUP_SIGNING(SETUP_SIGNING_DATA),
33386    #[doc = "Set the vehicle attitude and body angular rates."]
33387    #[doc = ""]
33388    #[doc = "ID: 139"]
33389    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33390    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33391    #[doc = ""]
33392    #[doc = "ID: 82"]
33393    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33394    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33395    #[doc = ""]
33396    #[doc = "ID: 48"]
33397    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33398    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33399    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33400    #[doc = ""]
33401    #[doc = "ID: 243"]
33402    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33403    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33404    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33405    #[doc = ""]
33406    #[doc = "ID: 11"]
33407    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33408    SET_MODE(SET_MODE_DATA),
33409    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33410    #[doc = ""]
33411    #[doc = "ID: 86"]
33412    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33413    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33414    #[doc = ""]
33415    #[doc = "ID: 84"]
33416    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33417    #[doc = "Status of simulation environment, if used."]
33418    #[doc = ""]
33419    #[doc = "ID: 108"]
33420    SIM_STATE(SIM_STATE_DATA),
33421    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33422    #[doc = ""]
33423    #[doc = "ID: 370"]
33424    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33425    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33426    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33427    #[doc = ""]
33428    #[doc = "ID: 253"]
33429    STATUSTEXT(STATUSTEXT_DATA),
33430    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33431    #[doc = ""]
33432    #[doc = "ID: 261"]
33433    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33434    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33435    #[doc = ""]
33436    #[doc = "ID: 401"]
33437    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33438    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33439    #[doc = ""]
33440    #[doc = "ID: 2"]
33441    SYSTEM_TIME(SYSTEM_TIME_DATA),
33442    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33443    #[doc = ""]
33444    #[doc = "ID: 1"]
33445    SYS_STATUS(SYS_STATUS_DATA),
33446    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33447    #[doc = ""]
33448    #[doc = "ID: 135"]
33449    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33450    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33451    #[doc = ""]
33452    #[doc = "ID: 134"]
33453    TERRAIN_DATA(TERRAIN_DATA_DATA),
33454    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33455    #[doc = ""]
33456    #[doc = "ID: 136"]
33457    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33458    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33459    #[doc = ""]
33460    #[doc = "ID: 133"]
33461    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33462    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33463    #[doc = ""]
33464    #[doc = "ID: 111"]
33465    TIMESYNC(TIMESYNC_DATA),
33466    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33467    #[doc = ""]
33468    #[doc = "ID: 380"]
33469    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33470    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33471    #[doc = ""]
33472    #[doc = "ID: 333"]
33473    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33474    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33475    #[doc = ""]
33476    #[doc = "ID: 332"]
33477    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33478    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33479    #[doc = ""]
33480    #[doc = "ID: 385"]
33481    TUNNEL(TUNNEL_DATA),
33482    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33483    #[doc = ""]
33484    #[doc = "ID: 311"]
33485    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33486    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33487    #[doc = ""]
33488    #[doc = "ID: 310"]
33489    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33490    #[doc = "The global position resulting from GPS and sensor fusion."]
33491    #[doc = ""]
33492    #[doc = "ID: 340"]
33493    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33494    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33495    #[doc = ""]
33496    #[doc = "ID: 248"]
33497    V2_EXTENSION(V2_EXTENSION_DATA),
33498    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33499    #[doc = ""]
33500    #[doc = "ID: 74"]
33501    VFR_HUD(VFR_HUD_DATA),
33502    #[doc = "Vibration levels and accelerometer clipping."]
33503    #[doc = ""]
33504    #[doc = "ID: 241"]
33505    VIBRATION(VIBRATION_DATA),
33506    #[doc = "Global position estimate from a Vicon motion system source."]
33507    #[doc = ""]
33508    #[doc = "ID: 104"]
33509    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33510    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33511    #[doc = ""]
33512    #[doc = "ID: 269"]
33513    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33514    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33515    #[doc = ""]
33516    #[doc = "ID: 270"]
33517    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33518    #[doc = "Local position/attitude estimate from a vision source."]
33519    #[doc = ""]
33520    #[doc = "ID: 102"]
33521    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33522    #[doc = "Speed estimate from a vision source."]
33523    #[doc = ""]
33524    #[doc = "ID: 103"]
33525    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33526    #[doc = "Cumulative distance traveled for each reported wheel."]
33527    #[doc = ""]
33528    #[doc = "ID: 9000"]
33529    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33530    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33531    #[doc = ""]
33532    #[doc = "ID: 299"]
33533    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33534    #[doc = "Winch status."]
33535    #[doc = ""]
33536    #[doc = "ID: 9005"]
33537    WINCH_STATUS(WINCH_STATUS_DATA),
33538    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33539    #[doc = ""]
33540    #[doc = "ID: 231"]
33541    WIND_COV(WIND_COV_DATA),
33542}
33543impl MavMessage {
33544    pub const fn all_ids() -> &'static [u32] {
33545        &[
33546            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33547            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33548            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33549            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33550            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33551            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33552            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33553            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33554            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33555            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33556            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33557            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33558            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33559            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33560            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33561            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33562            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33563            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33564            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33565            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33566            12915u32, 12918u32, 12919u32, 12920u32, 60050u32, 60051u32, 60052u32, 60053u32,
33567        ]
33568    }
33569}
33570impl Message for MavMessage {
33571    fn parse(
33572        version: MavlinkVersion,
33573        id: u32,
33574        payload: &[u8],
33575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33576        match id {
33577            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33578                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33579                    .map(Self::ACTUATOR_CONTROL_TARGET)
33580            }
33581            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33582                .map(Self::ACTUATOR_OUTPUT_STATUS),
33583            ADSB_VEHICLE_DATA::ID => {
33584                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33585            }
33586            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33587            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33588            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33589            ATTITUDE_QUATERNION_DATA::ID => {
33590                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33591            }
33592            ATTITUDE_QUATERNION_COV_DATA::ID => {
33593                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33594                    .map(Self::ATTITUDE_QUATERNION_COV)
33595            }
33596            ATTITUDE_TARGET_DATA::ID => {
33597                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33598            }
33599            ATT_POS_MOCAP_DATA::ID => {
33600                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33601            }
33602            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33603            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33604                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33605                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33606            }
33607            AUTOPILOT_VERSION_DATA::ID => {
33608                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33609            }
33610            AVAILABLE_MODES_DATA::ID => {
33611                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33612            }
33613            AVAILABLE_MODES_MONITOR_DATA::ID => {
33614                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33615                    .map(Self::AVAILABLE_MODES_MONITOR)
33616            }
33617            AVSS_DRONE_IMU_DATA::ID => {
33618                AVSS_DRONE_IMU_DATA::deser(version, payload).map(Self::AVSS_DRONE_IMU)
33619            }
33620            AVSS_DRONE_OPERATION_MODE_DATA::ID => {
33621                AVSS_DRONE_OPERATION_MODE_DATA::deser(version, payload)
33622                    .map(Self::AVSS_DRONE_OPERATION_MODE)
33623            }
33624            AVSS_DRONE_POSITION_DATA::ID => {
33625                AVSS_DRONE_POSITION_DATA::deser(version, payload).map(Self::AVSS_DRONE_POSITION)
33626            }
33627            AVSS_PRS_SYS_STATUS_DATA::ID => {
33628                AVSS_PRS_SYS_STATUS_DATA::deser(version, payload).map(Self::AVSS_PRS_SYS_STATUS)
33629            }
33630            BATTERY_INFO_DATA::ID => {
33631                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33632            }
33633            BATTERY_STATUS_DATA::ID => {
33634                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33635            }
33636            BUTTON_CHANGE_DATA::ID => {
33637                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33638            }
33639            CAMERA_CAPTURE_STATUS_DATA::ID => {
33640                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33641            }
33642            CAMERA_FOV_STATUS_DATA::ID => {
33643                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33644            }
33645            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33646                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33647            }
33648            CAMERA_INFORMATION_DATA::ID => {
33649                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33650            }
33651            CAMERA_SETTINGS_DATA::ID => {
33652                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33653            }
33654            CAMERA_THERMAL_RANGE_DATA::ID => {
33655                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33656            }
33657            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33658                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33659                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33660            }
33661            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33662                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33663                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33664            }
33665            CAMERA_TRIGGER_DATA::ID => {
33666                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33667            }
33668            CANFD_FRAME_DATA::ID => {
33669                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33670            }
33671            CAN_FILTER_MODIFY_DATA::ID => {
33672                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33673            }
33674            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33675            CELLULAR_CONFIG_DATA::ID => {
33676                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33677            }
33678            CELLULAR_STATUS_DATA::ID => {
33679                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33680            }
33681            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33682                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33683                    .map(Self::CHANGE_OPERATOR_CONTROL)
33684            }
33685            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33686                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33687                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33688            }
33689            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33690            COMMAND_ACK_DATA::ID => {
33691                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33692            }
33693            COMMAND_CANCEL_DATA::ID => {
33694                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33695            }
33696            COMMAND_INT_DATA::ID => {
33697                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33698            }
33699            COMMAND_LONG_DATA::ID => {
33700                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33701            }
33702            COMPONENT_INFORMATION_DATA::ID => {
33703                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33704            }
33705            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33706                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33707                    .map(Self::COMPONENT_INFORMATION_BASIC)
33708            }
33709            COMPONENT_METADATA_DATA::ID => {
33710                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33711            }
33712            CONTROL_SYSTEM_STATE_DATA::ID => {
33713                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33714            }
33715            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33716                .map(Self::CURRENT_EVENT_SEQUENCE),
33717            CURRENT_MODE_DATA::ID => {
33718                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33719            }
33720            DATA_STREAM_DATA::ID => {
33721                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33722            }
33723            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33724                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33725                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33726            }
33727            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33728            DEBUG_FLOAT_ARRAY_DATA::ID => {
33729                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33730            }
33731            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33732            DISTANCE_SENSOR_DATA::ID => {
33733                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33734            }
33735            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33736            ENCAPSULATED_DATA_DATA::ID => {
33737                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33738            }
33739            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33740            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33741            ESTIMATOR_STATUS_DATA::ID => {
33742                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33743            }
33744            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33745            EXTENDED_SYS_STATE_DATA::ID => {
33746                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33747            }
33748            FENCE_STATUS_DATA::ID => {
33749                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33750            }
33751            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33752                .map(Self::FILE_TRANSFER_PROTOCOL),
33753            FLIGHT_INFORMATION_DATA::ID => {
33754                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33755            }
33756            FOLLOW_TARGET_DATA::ID => {
33757                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33758            }
33759            FUEL_STATUS_DATA::ID => {
33760                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33761            }
33762            GENERATOR_STATUS_DATA::ID => {
33763                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33764            }
33765            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33766                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33767                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33768            }
33769            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33770                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33771                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33772            }
33773            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33774                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33775                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33776            }
33777            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33778                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33779                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33780            }
33781            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33782                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33783                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33784            }
33785            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33786                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33787                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33788            }
33789            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33790                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33791                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33792            }
33793            GIMBAL_MANAGER_STATUS_DATA::ID => {
33794                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33795            }
33796            GLOBAL_POSITION_INT_DATA::ID => {
33797                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33798            }
33799            GLOBAL_POSITION_INT_COV_DATA::ID => {
33800                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33801                    .map(Self::GLOBAL_POSITION_INT_COV)
33802            }
33803            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33804                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33805                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33806            }
33807            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33808            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33809            GPS_GLOBAL_ORIGIN_DATA::ID => {
33810                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33811            }
33812            GPS_INJECT_DATA_DATA::ID => {
33813                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33814            }
33815            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33816            GPS_RAW_INT_DATA::ID => {
33817                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33818            }
33819            GPS_RTCM_DATA_DATA::ID => {
33820                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33821            }
33822            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33823            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33824            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33825            HIGHRES_IMU_DATA::ID => {
33826                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33827            }
33828            HIGH_LATENCY_DATA::ID => {
33829                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33830            }
33831            HIGH_LATENCY2_DATA::ID => {
33832                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33833            }
33834            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33835                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33836            }
33837            HIL_CONTROLS_DATA::ID => {
33838                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33839            }
33840            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33841            HIL_OPTICAL_FLOW_DATA::ID => {
33842                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33843            }
33844            HIL_RC_INPUTS_RAW_DATA::ID => {
33845                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33846            }
33847            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33848            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33849            HIL_STATE_QUATERNION_DATA::ID => {
33850                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33851            }
33852            HOME_POSITION_DATA::ID => {
33853                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33854            }
33855            HYGROMETER_SENSOR_DATA::ID => {
33856                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33857            }
33858            ILLUMINATOR_STATUS_DATA::ID => {
33859                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33860            }
33861            ISBD_LINK_STATUS_DATA::ID => {
33862                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33863            }
33864            LANDING_TARGET_DATA::ID => {
33865                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33866            }
33867            LINK_NODE_STATUS_DATA::ID => {
33868                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33869            }
33870            LOCAL_POSITION_NED_DATA::ID => {
33871                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33872            }
33873            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33874                .map(Self::LOCAL_POSITION_NED_COV),
33875            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33876                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33877                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33878            }
33879            LOGGING_ACK_DATA::ID => {
33880                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33881            }
33882            LOGGING_DATA_DATA::ID => {
33883                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33884            }
33885            LOGGING_DATA_ACKED_DATA::ID => {
33886                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33887            }
33888            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33889            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33890            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33891            LOG_REQUEST_DATA_DATA::ID => {
33892                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33893            }
33894            LOG_REQUEST_END_DATA::ID => {
33895                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33896            }
33897            LOG_REQUEST_LIST_DATA::ID => {
33898                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33899            }
33900            MAG_CAL_REPORT_DATA::ID => {
33901                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33902            }
33903            MANUAL_CONTROL_DATA::ID => {
33904                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33905            }
33906            MANUAL_SETPOINT_DATA::ID => {
33907                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33908            }
33909            MEMORY_VECT_DATA::ID => {
33910                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33911            }
33912            MESSAGE_INTERVAL_DATA::ID => {
33913                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33914            }
33915            MISSION_ACK_DATA::ID => {
33916                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33917            }
33918            MISSION_CLEAR_ALL_DATA::ID => {
33919                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33920            }
33921            MISSION_COUNT_DATA::ID => {
33922                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33923            }
33924            MISSION_CURRENT_DATA::ID => {
33925                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33926            }
33927            MISSION_ITEM_DATA::ID => {
33928                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33929            }
33930            MISSION_ITEM_INT_DATA::ID => {
33931                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33932            }
33933            MISSION_ITEM_REACHED_DATA::ID => {
33934                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33935            }
33936            MISSION_REQUEST_DATA::ID => {
33937                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33938            }
33939            MISSION_REQUEST_INT_DATA::ID => {
33940                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33941            }
33942            MISSION_REQUEST_LIST_DATA::ID => {
33943                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33944            }
33945            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33946                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33947                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33948            }
33949            MISSION_SET_CURRENT_DATA::ID => {
33950                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33951            }
33952            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33953                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33954                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33955            }
33956            MOUNT_ORIENTATION_DATA::ID => {
33957                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33958            }
33959            NAMED_VALUE_FLOAT_DATA::ID => {
33960                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33961            }
33962            NAMED_VALUE_INT_DATA::ID => {
33963                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33964            }
33965            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33966                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33967            }
33968            OBSTACLE_DISTANCE_DATA::ID => {
33969                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33970            }
33971            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33972            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33973                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33974                    .map(Self::ONBOARD_COMPUTER_STATUS)
33975            }
33976            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33977                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33978                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33979            }
33980            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33981                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33982                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33983            }
33984            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33985                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33986            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33987                .map(Self::OPEN_DRONE_ID_LOCATION),
33988            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33989                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33990                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33991            }
33992            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33993                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33994                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33995            }
33996            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33997                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33998            }
33999            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34000                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34001            }
34002            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34003                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34004                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34005            }
34006            OPTICAL_FLOW_DATA::ID => {
34007                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34008            }
34009            OPTICAL_FLOW_RAD_DATA::ID => {
34010                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34011            }
34012            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34013                .map(Self::ORBIT_EXECUTION_STATUS),
34014            PARAM_EXT_ACK_DATA::ID => {
34015                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34016            }
34017            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34018                .map(Self::PARAM_EXT_REQUEST_LIST),
34019            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34020                .map(Self::PARAM_EXT_REQUEST_READ),
34021            PARAM_EXT_SET_DATA::ID => {
34022                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34023            }
34024            PARAM_EXT_VALUE_DATA::ID => {
34025                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34026            }
34027            PARAM_MAP_RC_DATA::ID => {
34028                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34029            }
34030            PARAM_REQUEST_LIST_DATA::ID => {
34031                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34032            }
34033            PARAM_REQUEST_READ_DATA::ID => {
34034                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34035            }
34036            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34037            PARAM_VALUE_DATA::ID => {
34038                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34039            }
34040            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34041            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34042            PLAY_TUNE_V2_DATA::ID => {
34043                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34044            }
34045            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34046                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34047                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34048            }
34049            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34050                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34051                    .map(Self::POSITION_TARGET_LOCAL_NED)
34052            }
34053            POWER_STATUS_DATA::ID => {
34054                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34055            }
34056            PROTOCOL_VERSION_DATA::ID => {
34057                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34058            }
34059            RADIO_STATUS_DATA::ID => {
34060                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34061            }
34062            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34063            RAW_PRESSURE_DATA::ID => {
34064                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34065            }
34066            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34067            RC_CHANNELS_DATA::ID => {
34068                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34069            }
34070            RC_CHANNELS_OVERRIDE_DATA::ID => {
34071                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34072            }
34073            RC_CHANNELS_RAW_DATA::ID => {
34074                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34075            }
34076            RC_CHANNELS_SCALED_DATA::ID => {
34077                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34078            }
34079            REQUEST_DATA_STREAM_DATA::ID => {
34080                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34081            }
34082            REQUEST_EVENT_DATA::ID => {
34083                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34084            }
34085            RESOURCE_REQUEST_DATA::ID => {
34086                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34087            }
34088            RESPONSE_EVENT_ERROR_DATA::ID => {
34089                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34090            }
34091            SAFETY_ALLOWED_AREA_DATA::ID => {
34092                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34093            }
34094            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34095                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34096                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34097            }
34098            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34099            SCALED_IMU2_DATA::ID => {
34100                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34101            }
34102            SCALED_IMU3_DATA::ID => {
34103                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34104            }
34105            SCALED_PRESSURE_DATA::ID => {
34106                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34107            }
34108            SCALED_PRESSURE2_DATA::ID => {
34109                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34110            }
34111            SCALED_PRESSURE3_DATA::ID => {
34112                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34113            }
34114            SERIAL_CONTROL_DATA::ID => {
34115                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34116            }
34117            SERVO_OUTPUT_RAW_DATA::ID => {
34118                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34119            }
34120            SETUP_SIGNING_DATA::ID => {
34121                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34122            }
34123            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34124                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34125                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34126            }
34127            SET_ATTITUDE_TARGET_DATA::ID => {
34128                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34129            }
34130            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34131                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34132            }
34133            SET_HOME_POSITION_DATA::ID => {
34134                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34135            }
34136            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34137            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34138                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34139                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34140            }
34141            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34142                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34143                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34144            }
34145            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34146            SMART_BATTERY_INFO_DATA::ID => {
34147                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34148            }
34149            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34150            STORAGE_INFORMATION_DATA::ID => {
34151                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34152            }
34153            SUPPORTED_TUNES_DATA::ID => {
34154                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34155            }
34156            SYSTEM_TIME_DATA::ID => {
34157                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34158            }
34159            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34160            TERRAIN_CHECK_DATA::ID => {
34161                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34162            }
34163            TERRAIN_DATA_DATA::ID => {
34164                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34165            }
34166            TERRAIN_REPORT_DATA::ID => {
34167                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34168            }
34169            TERRAIN_REQUEST_DATA::ID => {
34170                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34171            }
34172            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34173            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34174                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34175                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34176            }
34177            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34178                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34179                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34180            }
34181            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34182                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34183                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34184            }
34185            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34186            UAVCAN_NODE_INFO_DATA::ID => {
34187                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34188            }
34189            UAVCAN_NODE_STATUS_DATA::ID => {
34190                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34191            }
34192            UTM_GLOBAL_POSITION_DATA::ID => {
34193                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34194            }
34195            V2_EXTENSION_DATA::ID => {
34196                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34197            }
34198            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34199            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34200            VICON_POSITION_ESTIMATE_DATA::ID => {
34201                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34202                    .map(Self::VICON_POSITION_ESTIMATE)
34203            }
34204            VIDEO_STREAM_INFORMATION_DATA::ID => {
34205                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34206                    .map(Self::VIDEO_STREAM_INFORMATION)
34207            }
34208            VIDEO_STREAM_STATUS_DATA::ID => {
34209                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34210            }
34211            VISION_POSITION_ESTIMATE_DATA::ID => {
34212                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34213                    .map(Self::VISION_POSITION_ESTIMATE)
34214            }
34215            VISION_SPEED_ESTIMATE_DATA::ID => {
34216                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34217            }
34218            WHEEL_DISTANCE_DATA::ID => {
34219                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34220            }
34221            WIFI_CONFIG_AP_DATA::ID => {
34222                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34223            }
34224            WINCH_STATUS_DATA::ID => {
34225                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34226            }
34227            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34228            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34229        }
34230    }
34231    fn message_name(&self) -> &'static str {
34232        match self {
34233            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34234            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34235            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34236            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34237            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34238            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34239            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34240            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34241            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34242            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34243            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34244            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34245                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34246            }
34247            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34248            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34249            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34250            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::NAME,
34251            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::NAME,
34252            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::NAME,
34253            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::NAME,
34254            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34255            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34256            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34257            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34258            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34259            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34260            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34261            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34262            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34263            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34264            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34265            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34266            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34267            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34268            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34269            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34270            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34271            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34272            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34273            Self::COLLISION(..) => COLLISION_DATA::NAME,
34274            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34275            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34276            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34277            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34278            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34279            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34280            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34281            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34282            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34283            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34284            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34285            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34286            Self::DEBUG(..) => DEBUG_DATA::NAME,
34287            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34288            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34289            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34290            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34291            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34292            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34293            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34294            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34295            Self::EVENT(..) => EVENT_DATA::NAME,
34296            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34297            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34298            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34299            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34300            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34301            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34302            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34303            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34304            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34305            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34306            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34307            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34308            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34309                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34310            }
34311            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34312            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34313            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34314            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34315            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34316            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34317            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34318            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34319            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34320            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34321            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34322            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34323            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34324            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34325            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34326            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34327            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34328            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34329            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34330            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34331            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34332            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34333            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34334            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34335            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34336            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34337            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34338            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34339            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34340            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34341            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34342            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34343            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34344            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34345            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34346                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34347            }
34348            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34349            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34350            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34351            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34352            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34353            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34354            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34355            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34356            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34357            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34358            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34359            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34360            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34361            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34362            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34363            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34364            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34365            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34366            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34367            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34368            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34369            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34370            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34371            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34372            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34373            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34374            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34375            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34376            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34377            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34378            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34379            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34380            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34381            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34382            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34383            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34384            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34385            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34386            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34387            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34388            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34389            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34390            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34391            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34392            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34393            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34394            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34395            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34396            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34397            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34398            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34399            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34400            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34401            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34402            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34403            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34404            Self::PING(..) => PING_DATA::NAME,
34405            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34406            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34407            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34408            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34409            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34410            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34411            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34412            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34413            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34414            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34415            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34416            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34417            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34418            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34419            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34420            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34421            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34422            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34423            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34424            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34425            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34426            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34427            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34428            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34429            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34430            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34431            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34432            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34433            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34434            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34435            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34436            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34437            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34438            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34439            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34440            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34441            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34442            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34443            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34444            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34445            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34446            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34447            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34448            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34449            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34450            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34451            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34452            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34453            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34454            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34455                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34456            }
34457            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34458                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34459            }
34460            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34461            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34462            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34463            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34464            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34465            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34466            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34467            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34468            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34469            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34470            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34471            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34472            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34473            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34474            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34475            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34476        }
34477    }
34478    fn message_id(&self) -> u32 {
34479        match self {
34480            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34481            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34482            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34483            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34484            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34485            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34486            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34487            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34488            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34489            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34490            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34491            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34492                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34493            }
34494            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34495            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34496            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34497            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::ID,
34498            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::ID,
34499            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::ID,
34500            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::ID,
34501            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34502            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34503            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34504            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34505            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34506            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34507            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34508            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34509            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34510            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34511            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34512            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34513            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34514            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34515            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34516            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34517            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34518            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34519            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34520            Self::COLLISION(..) => COLLISION_DATA::ID,
34521            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34522            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34523            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34524            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34525            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34526            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34527            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34528            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34529            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34530            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34531            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34532            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34533            Self::DEBUG(..) => DEBUG_DATA::ID,
34534            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34535            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34536            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34537            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34538            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34539            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34540            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34541            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34542            Self::EVENT(..) => EVENT_DATA::ID,
34543            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34544            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34545            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34546            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34547            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34548            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34549            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34550            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34551            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34552            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34553            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34554            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34555            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34556                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34557            }
34558            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34559            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34560            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34561            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34562            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34563            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34564            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34565            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34566            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34567            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34568            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34569            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34570            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34571            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34572            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34573            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34574            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34575            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34576            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34577            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34578            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34579            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34580            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34581            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34582            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34583            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34584            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34585            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34586            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34587            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34588            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34589            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34590            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34591            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34592            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34593                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34594            }
34595            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34596            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34597            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34598            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34599            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34600            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34601            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34602            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34603            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34604            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34605            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34606            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34607            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34608            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34609            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34610            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34611            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34612            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34613            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34614            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34615            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34616            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34617            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34618            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34619            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34620            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34621            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34622            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34623            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34624            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34625            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34626            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34627            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34628            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34629            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34630            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34631            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34632            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34633            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34634            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34635            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34636            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34637            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34638            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34639            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34640            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34641            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34642            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34643            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34644            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34645            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34646            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34647            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34648            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34649            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34650            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34651            Self::PING(..) => PING_DATA::ID,
34652            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34653            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34654            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34655            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34656            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34657            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34658            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34659            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34660            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34661            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34662            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34663            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34664            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34665            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34666            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34667            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34668            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34669            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34670            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34671            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34672            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34673            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34674            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34675            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34676            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34677            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34678            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34679            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34680            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34681            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34682            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34683            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34684            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34685            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34686            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34687            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34688            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34689            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34690            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34691            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34692            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34693            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34694            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34695            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34696            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34697            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34698            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34699            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34700            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34701            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34702            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34703                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34704            }
34705            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34706            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34707            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34708            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34709            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34710            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34711            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34712            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34713            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34714            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34715            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34716            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34717            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34718            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34719            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34720            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34721        }
34722    }
34723    fn message_id_from_name(name: &str) -> Option<u32> {
34724        match name {
34725            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34726            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34727            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34728            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34729            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34730            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34731            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34732            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34733            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34734            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34735            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34736            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34737                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34738            }
34739            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34740            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34741            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34742            AVSS_DRONE_IMU_DATA::NAME => Some(AVSS_DRONE_IMU_DATA::ID),
34743            AVSS_DRONE_OPERATION_MODE_DATA::NAME => Some(AVSS_DRONE_OPERATION_MODE_DATA::ID),
34744            AVSS_DRONE_POSITION_DATA::NAME => Some(AVSS_DRONE_POSITION_DATA::ID),
34745            AVSS_PRS_SYS_STATUS_DATA::NAME => Some(AVSS_PRS_SYS_STATUS_DATA::ID),
34746            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34747            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34748            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34749            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34750            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34751            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34752            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34753            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34754            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34755            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34756            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34757            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34758            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34759            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34760            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34761            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34762            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34763            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34764            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34765            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34766            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34767            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34768            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34769            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34770            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34771            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34772            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34773            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34774            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34775            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34776            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34777            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34778            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34779            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34780            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34781            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34782            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34783            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34784            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34785            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34786            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34787            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34788            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34789            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34790            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34791            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34792            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34793            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34794            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34795            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34796                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34797            }
34798            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34799            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34800            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34801            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34802            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34803                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34804            }
34805            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34806            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34807            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34808            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34809            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34810                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34811            }
34812            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34813            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34814            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34815            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34816            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34817            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34818            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34819            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34820            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34821            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34822            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34823            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34824            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34825            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34826            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34827            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34828            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34829            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34830            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34831            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34832            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34833            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34834            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34835            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34836            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34837            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34838            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34839            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34840            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34841            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34842                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34843            }
34844            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34845            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34846            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34847            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34848            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34849            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34850            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34851            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34852            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34853            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34854            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34855            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34856            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34857            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34858            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34859            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34860            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34861            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34862            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34863            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34864            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34865            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34866            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34867            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34868            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34869            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34870            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34871            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34872            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34873            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34874            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34875            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34876            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34877            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34878            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34879            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34880            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34881            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34882            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34883            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34884            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34885            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34886            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34887            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34888            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34889            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34890            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34891            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34892            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34893            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34894            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34895            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34896            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34897            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34898            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34899            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34900            PING_DATA::NAME => Some(PING_DATA::ID),
34901            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34902            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34903            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34904            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34905            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34906            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34907            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34908            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34909            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34910            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34911            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34912            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34913            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34914            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34915            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34916            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34917            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34918            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34919            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34920            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34921            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34922            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34923            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34924            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34925            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34926            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34927            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34928            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34929            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34930            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34931            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34932            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34933            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34934            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34935            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34936                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34937            }
34938            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34939                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34940            }
34941            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34942            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34943            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34944            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34945            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34946            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34947            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34948            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34949            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34950            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34951            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34952            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34953            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34954            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34955                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34956            }
34957            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34958                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34959            }
34960            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34961            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34962            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34963            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34964            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34965            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34966            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34967            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34968            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34969            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34970            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34971            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34972            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34973            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34974            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34975            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34976            _ => None,
34977        }
34978    }
34979    fn default_message_from_id(id: u32) -> Option<Self> {
34980        match id {
34981            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34982                ACTUATOR_CONTROL_TARGET_DATA::default(),
34983            )),
34984            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34985                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34986            )),
34987            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34988            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34989            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34990            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34991            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34992                ATTITUDE_QUATERNION_DATA::default(),
34993            )),
34994            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34995                ATTITUDE_QUATERNION_COV_DATA::default(),
34996            )),
34997            ATTITUDE_TARGET_DATA::ID => {
34998                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34999            }
35000            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35001            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35002            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35003                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35004                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35005                ))
35006            }
35007            AUTOPILOT_VERSION_DATA::ID => {
35008                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35009            }
35010            AVAILABLE_MODES_DATA::ID => {
35011                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35012            }
35013            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35014                AVAILABLE_MODES_MONITOR_DATA::default(),
35015            )),
35016            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::default())),
35017            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
35018                AVSS_DRONE_OPERATION_MODE_DATA::default(),
35019            )),
35020            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
35021                AVSS_DRONE_POSITION_DATA::default(),
35022            )),
35023            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
35024                AVSS_PRS_SYS_STATUS_DATA::default(),
35025            )),
35026            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35027            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35028            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35029            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35030                CAMERA_CAPTURE_STATUS_DATA::default(),
35031            )),
35032            CAMERA_FOV_STATUS_DATA::ID => {
35033                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35034            }
35035            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35036                CAMERA_IMAGE_CAPTURED_DATA::default(),
35037            )),
35038            CAMERA_INFORMATION_DATA::ID => {
35039                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35040            }
35041            CAMERA_SETTINGS_DATA::ID => {
35042                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35043            }
35044            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35045                CAMERA_THERMAL_RANGE_DATA::default(),
35046            )),
35047            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35048                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35049            )),
35050            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35051                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35052            )),
35053            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35054            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35055            CAN_FILTER_MODIFY_DATA::ID => {
35056                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35057            }
35058            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35059            CELLULAR_CONFIG_DATA::ID => {
35060                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35061            }
35062            CELLULAR_STATUS_DATA::ID => {
35063                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35064            }
35065            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35066                CHANGE_OPERATOR_CONTROL_DATA::default(),
35067            )),
35068            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35069                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35070            )),
35071            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35072            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35073            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35074            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35075            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35076            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35077                COMPONENT_INFORMATION_DATA::default(),
35078            )),
35079            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35080                COMPONENT_INFORMATION_BASIC_DATA::default(),
35081            )),
35082            COMPONENT_METADATA_DATA::ID => {
35083                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35084            }
35085            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35086                CONTROL_SYSTEM_STATE_DATA::default(),
35087            )),
35088            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35089                CURRENT_EVENT_SEQUENCE_DATA::default(),
35090            )),
35091            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35092            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35093            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35094                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35095            )),
35096            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35097            DEBUG_FLOAT_ARRAY_DATA::ID => {
35098                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35099            }
35100            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35101            DISTANCE_SENSOR_DATA::ID => {
35102                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35103            }
35104            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35105            ENCAPSULATED_DATA_DATA::ID => {
35106                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35107            }
35108            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35109            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35110            ESTIMATOR_STATUS_DATA::ID => {
35111                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35112            }
35113            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35114            EXTENDED_SYS_STATE_DATA::ID => {
35115                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35116            }
35117            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35118            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35119                FILE_TRANSFER_PROTOCOL_DATA::default(),
35120            )),
35121            FLIGHT_INFORMATION_DATA::ID => {
35122                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35123            }
35124            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35125            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35126            GENERATOR_STATUS_DATA::ID => {
35127                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35128            }
35129            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35130                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35131            )),
35132            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35133                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35134            )),
35135            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35136                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35137            )),
35138            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35139                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35140            )),
35141            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35142                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35143            )),
35144            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35145                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35146                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35147                ))
35148            }
35149            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35150                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35151            )),
35152            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35153                GIMBAL_MANAGER_STATUS_DATA::default(),
35154            )),
35155            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35156                GLOBAL_POSITION_INT_DATA::default(),
35157            )),
35158            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35159                GLOBAL_POSITION_INT_COV_DATA::default(),
35160            )),
35161            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35162                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35163                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35164                ))
35165            }
35166            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35167            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35168            GPS_GLOBAL_ORIGIN_DATA::ID => {
35169                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35170            }
35171            GPS_INJECT_DATA_DATA::ID => {
35172                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35173            }
35174            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35175            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35176            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35177            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35178            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35179            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35180            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35181            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35182            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35183            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35184                HIL_ACTUATOR_CONTROLS_DATA::default(),
35185            )),
35186            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35187            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35188            HIL_OPTICAL_FLOW_DATA::ID => {
35189                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35190            }
35191            HIL_RC_INPUTS_RAW_DATA::ID => {
35192                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35193            }
35194            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35195            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35196            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35197                HIL_STATE_QUATERNION_DATA::default(),
35198            )),
35199            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35200            HYGROMETER_SENSOR_DATA::ID => {
35201                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35202            }
35203            ILLUMINATOR_STATUS_DATA::ID => {
35204                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35205            }
35206            ISBD_LINK_STATUS_DATA::ID => {
35207                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35208            }
35209            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35210            LINK_NODE_STATUS_DATA::ID => {
35211                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35212            }
35213            LOCAL_POSITION_NED_DATA::ID => {
35214                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35215            }
35216            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35217                LOCAL_POSITION_NED_COV_DATA::default(),
35218            )),
35219            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35220                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35221                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35222                ))
35223            }
35224            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35225            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35226            LOGGING_DATA_ACKED_DATA::ID => {
35227                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35228            }
35229            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35230            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35231            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35232            LOG_REQUEST_DATA_DATA::ID => {
35233                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35234            }
35235            LOG_REQUEST_END_DATA::ID => {
35236                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35237            }
35238            LOG_REQUEST_LIST_DATA::ID => {
35239                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35240            }
35241            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35242            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35243            MANUAL_SETPOINT_DATA::ID => {
35244                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35245            }
35246            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35247            MESSAGE_INTERVAL_DATA::ID => {
35248                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35249            }
35250            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35251            MISSION_CLEAR_ALL_DATA::ID => {
35252                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35253            }
35254            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35255            MISSION_CURRENT_DATA::ID => {
35256                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35257            }
35258            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35259            MISSION_ITEM_INT_DATA::ID => {
35260                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35261            }
35262            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35263                MISSION_ITEM_REACHED_DATA::default(),
35264            )),
35265            MISSION_REQUEST_DATA::ID => {
35266                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35267            }
35268            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35269                MISSION_REQUEST_INT_DATA::default(),
35270            )),
35271            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35272                MISSION_REQUEST_LIST_DATA::default(),
35273            )),
35274            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35275                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35276            )),
35277            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35278                MISSION_SET_CURRENT_DATA::default(),
35279            )),
35280            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35281                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35282            )),
35283            MOUNT_ORIENTATION_DATA::ID => {
35284                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35285            }
35286            NAMED_VALUE_FLOAT_DATA::ID => {
35287                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35288            }
35289            NAMED_VALUE_INT_DATA::ID => {
35290                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35291            }
35292            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35293                NAV_CONTROLLER_OUTPUT_DATA::default(),
35294            )),
35295            OBSTACLE_DISTANCE_DATA::ID => {
35296                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35297            }
35298            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35299            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35300                ONBOARD_COMPUTER_STATUS_DATA::default(),
35301            )),
35302            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35303                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35304            )),
35305            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35306                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35307            )),
35308            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35309                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35310            )),
35311            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35312                OPEN_DRONE_ID_LOCATION_DATA::default(),
35313            )),
35314            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35315                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35316            )),
35317            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35318                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35319            )),
35320            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35321                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35322            )),
35323            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35324                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35325            )),
35326            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35327                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35328            )),
35329            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35330            OPTICAL_FLOW_RAD_DATA::ID => {
35331                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35332            }
35333            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35334                ORBIT_EXECUTION_STATUS_DATA::default(),
35335            )),
35336            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35337            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35338                PARAM_EXT_REQUEST_LIST_DATA::default(),
35339            )),
35340            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35341                PARAM_EXT_REQUEST_READ_DATA::default(),
35342            )),
35343            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35344            PARAM_EXT_VALUE_DATA::ID => {
35345                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35346            }
35347            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35348            PARAM_REQUEST_LIST_DATA::ID => {
35349                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35350            }
35351            PARAM_REQUEST_READ_DATA::ID => {
35352                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35353            }
35354            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35355            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35356            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35357            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35358            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35359            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35360                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35361            )),
35362            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35363                POSITION_TARGET_LOCAL_NED_DATA::default(),
35364            )),
35365            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35366            PROTOCOL_VERSION_DATA::ID => {
35367                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35368            }
35369            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35370            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35371            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35372            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35373            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35374            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35375                RC_CHANNELS_OVERRIDE_DATA::default(),
35376            )),
35377            RC_CHANNELS_RAW_DATA::ID => {
35378                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35379            }
35380            RC_CHANNELS_SCALED_DATA::ID => {
35381                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35382            }
35383            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35384                REQUEST_DATA_STREAM_DATA::default(),
35385            )),
35386            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35387            RESOURCE_REQUEST_DATA::ID => {
35388                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35389            }
35390            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35391                RESPONSE_EVENT_ERROR_DATA::default(),
35392            )),
35393            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35394                SAFETY_ALLOWED_AREA_DATA::default(),
35395            )),
35396            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35397                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35398            )),
35399            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35400            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35401            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35402            SCALED_PRESSURE_DATA::ID => {
35403                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35404            }
35405            SCALED_PRESSURE2_DATA::ID => {
35406                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35407            }
35408            SCALED_PRESSURE3_DATA::ID => {
35409                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35410            }
35411            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35412            SERVO_OUTPUT_RAW_DATA::ID => {
35413                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35414            }
35415            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35416            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35417                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35418            )),
35419            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35420                SET_ATTITUDE_TARGET_DATA::default(),
35421            )),
35422            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35423                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35424            )),
35425            SET_HOME_POSITION_DATA::ID => {
35426                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35427            }
35428            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35429            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35430                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35431            )),
35432            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35433                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35434            )),
35435            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35436            SMART_BATTERY_INFO_DATA::ID => {
35437                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35438            }
35439            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35440            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35441                STORAGE_INFORMATION_DATA::default(),
35442            )),
35443            SUPPORTED_TUNES_DATA::ID => {
35444                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35445            }
35446            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35447            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35448            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35449            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35450            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35451            TERRAIN_REQUEST_DATA::ID => {
35452                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35453            }
35454            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35455            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35456                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35457            )),
35458            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35459                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35460                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35461                ))
35462            }
35463            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35464                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35465                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35466                ))
35467            }
35468            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35469            UAVCAN_NODE_INFO_DATA::ID => {
35470                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35471            }
35472            UAVCAN_NODE_STATUS_DATA::ID => {
35473                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35474            }
35475            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35476                UTM_GLOBAL_POSITION_DATA::default(),
35477            )),
35478            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35479            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35480            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35481            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35482                VICON_POSITION_ESTIMATE_DATA::default(),
35483            )),
35484            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35485                VIDEO_STREAM_INFORMATION_DATA::default(),
35486            )),
35487            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35488                VIDEO_STREAM_STATUS_DATA::default(),
35489            )),
35490            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35491                VISION_POSITION_ESTIMATE_DATA::default(),
35492            )),
35493            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35494                VISION_SPEED_ESTIMATE_DATA::default(),
35495            )),
35496            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35497            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35498            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35499            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35500            _ => None,
35501        }
35502    }
35503    #[cfg(feature = "arbitrary")]
35504    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35505        match id {
35506            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35507                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35508            )),
35509            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35510                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35511            )),
35512            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35513            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35514            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35515            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35516            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35517                ATTITUDE_QUATERNION_DATA::random(rng),
35518            )),
35519            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35520                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35521            )),
35522            ATTITUDE_TARGET_DATA::ID => {
35523                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35524            }
35525            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35526            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35527            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35528                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35529                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35530                ))
35531            }
35532            AUTOPILOT_VERSION_DATA::ID => {
35533                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35534            }
35535            AVAILABLE_MODES_DATA::ID => {
35536                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35537            }
35538            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35539                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35540            )),
35541            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::random(rng))),
35542            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
35543                AVSS_DRONE_OPERATION_MODE_DATA::random(rng),
35544            )),
35545            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
35546                AVSS_DRONE_POSITION_DATA::random(rng),
35547            )),
35548            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
35549                AVSS_PRS_SYS_STATUS_DATA::random(rng),
35550            )),
35551            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35552            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35553            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35554            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35555                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35556            )),
35557            CAMERA_FOV_STATUS_DATA::ID => {
35558                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35559            }
35560            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35561                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35562            )),
35563            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35564                CAMERA_INFORMATION_DATA::random(rng),
35565            )),
35566            CAMERA_SETTINGS_DATA::ID => {
35567                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35568            }
35569            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35570                CAMERA_THERMAL_RANGE_DATA::random(rng),
35571            )),
35572            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35573                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35574            )),
35575            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35576                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35577            )),
35578            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35579            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35580            CAN_FILTER_MODIFY_DATA::ID => {
35581                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35582            }
35583            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35584            CELLULAR_CONFIG_DATA::ID => {
35585                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35586            }
35587            CELLULAR_STATUS_DATA::ID => {
35588                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35589            }
35590            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35591                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35592            )),
35593            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35594                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35595            )),
35596            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35597            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35598            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35599            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35600            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35601            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35602                COMPONENT_INFORMATION_DATA::random(rng),
35603            )),
35604            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35605                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35606            )),
35607            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35608                COMPONENT_METADATA_DATA::random(rng),
35609            )),
35610            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35611                CONTROL_SYSTEM_STATE_DATA::random(rng),
35612            )),
35613            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35614                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35615            )),
35616            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35617            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35618            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35619                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35620            )),
35621            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35622            DEBUG_FLOAT_ARRAY_DATA::ID => {
35623                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35624            }
35625            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35626            DISTANCE_SENSOR_DATA::ID => {
35627                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35628            }
35629            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35630            ENCAPSULATED_DATA_DATA::ID => {
35631                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35632            }
35633            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35634            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35635            ESTIMATOR_STATUS_DATA::ID => {
35636                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35637            }
35638            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35639            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35640                EXTENDED_SYS_STATE_DATA::random(rng),
35641            )),
35642            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35643            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35644                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35645            )),
35646            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35647                FLIGHT_INFORMATION_DATA::random(rng),
35648            )),
35649            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35650            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35651            GENERATOR_STATUS_DATA::ID => {
35652                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35653            }
35654            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35655                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35656            )),
35657            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35658                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35659            )),
35660            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35661                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35662            )),
35663            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35664                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35665            )),
35666            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35667                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35668            )),
35669            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35670                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35671                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35672                ))
35673            }
35674            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35675                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35676            )),
35677            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35678                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35679            )),
35680            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35681                GLOBAL_POSITION_INT_DATA::random(rng),
35682            )),
35683            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35684                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35685            )),
35686            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35687                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35688                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35689                ))
35690            }
35691            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35692            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35693            GPS_GLOBAL_ORIGIN_DATA::ID => {
35694                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35695            }
35696            GPS_INJECT_DATA_DATA::ID => {
35697                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35698            }
35699            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35700            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35701            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35702            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35703            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35704            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35705            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35706            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35707            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35708            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35709                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35710            )),
35711            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35712            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35713            HIL_OPTICAL_FLOW_DATA::ID => {
35714                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35715            }
35716            HIL_RC_INPUTS_RAW_DATA::ID => {
35717                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35718            }
35719            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35720            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35721            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35722                HIL_STATE_QUATERNION_DATA::random(rng),
35723            )),
35724            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35725            HYGROMETER_SENSOR_DATA::ID => {
35726                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35727            }
35728            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35729                ILLUMINATOR_STATUS_DATA::random(rng),
35730            )),
35731            ISBD_LINK_STATUS_DATA::ID => {
35732                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35733            }
35734            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35735            LINK_NODE_STATUS_DATA::ID => {
35736                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35737            }
35738            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35739                LOCAL_POSITION_NED_DATA::random(rng),
35740            )),
35741            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35742                LOCAL_POSITION_NED_COV_DATA::random(rng),
35743            )),
35744            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35745                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35746                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35747                ))
35748            }
35749            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35750            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35751            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35752                LOGGING_DATA_ACKED_DATA::random(rng),
35753            )),
35754            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35755            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35756            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35757            LOG_REQUEST_DATA_DATA::ID => {
35758                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35759            }
35760            LOG_REQUEST_END_DATA::ID => {
35761                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35762            }
35763            LOG_REQUEST_LIST_DATA::ID => {
35764                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35765            }
35766            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35767            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35768            MANUAL_SETPOINT_DATA::ID => {
35769                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35770            }
35771            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35772            MESSAGE_INTERVAL_DATA::ID => {
35773                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35774            }
35775            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35776            MISSION_CLEAR_ALL_DATA::ID => {
35777                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35778            }
35779            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35780            MISSION_CURRENT_DATA::ID => {
35781                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35782            }
35783            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35784            MISSION_ITEM_INT_DATA::ID => {
35785                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35786            }
35787            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35788                MISSION_ITEM_REACHED_DATA::random(rng),
35789            )),
35790            MISSION_REQUEST_DATA::ID => {
35791                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35792            }
35793            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35794                MISSION_REQUEST_INT_DATA::random(rng),
35795            )),
35796            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35797                MISSION_REQUEST_LIST_DATA::random(rng),
35798            )),
35799            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35800                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35801            )),
35802            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35803                MISSION_SET_CURRENT_DATA::random(rng),
35804            )),
35805            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35806                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35807            )),
35808            MOUNT_ORIENTATION_DATA::ID => {
35809                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35810            }
35811            NAMED_VALUE_FLOAT_DATA::ID => {
35812                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35813            }
35814            NAMED_VALUE_INT_DATA::ID => {
35815                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35816            }
35817            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35818                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35819            )),
35820            OBSTACLE_DISTANCE_DATA::ID => {
35821                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35822            }
35823            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35824            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35825                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35826            )),
35827            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35828                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35829            )),
35830            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35831                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35832            )),
35833            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35834                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35835            )),
35836            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35837                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35838            )),
35839            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35840                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35841            )),
35842            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35843                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35844            )),
35845            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35846                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35847            )),
35848            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35849                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35850            )),
35851            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35852                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35853            )),
35854            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35855            OPTICAL_FLOW_RAD_DATA::ID => {
35856                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35857            }
35858            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35859                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35860            )),
35861            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35862            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35863                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35864            )),
35865            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35866                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35867            )),
35868            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35869            PARAM_EXT_VALUE_DATA::ID => {
35870                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35871            }
35872            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35873            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35874                PARAM_REQUEST_LIST_DATA::random(rng),
35875            )),
35876            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35877                PARAM_REQUEST_READ_DATA::random(rng),
35878            )),
35879            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35880            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35881            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35882            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35883            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35884            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35885                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35886            )),
35887            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35888                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35889            )),
35890            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35891            PROTOCOL_VERSION_DATA::ID => {
35892                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35893            }
35894            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35895            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35896            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35897            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35898            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35899            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35900                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35901            )),
35902            RC_CHANNELS_RAW_DATA::ID => {
35903                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35904            }
35905            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35906                RC_CHANNELS_SCALED_DATA::random(rng),
35907            )),
35908            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35909                REQUEST_DATA_STREAM_DATA::random(rng),
35910            )),
35911            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35912            RESOURCE_REQUEST_DATA::ID => {
35913                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35914            }
35915            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35916                RESPONSE_EVENT_ERROR_DATA::random(rng),
35917            )),
35918            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35919                SAFETY_ALLOWED_AREA_DATA::random(rng),
35920            )),
35921            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35922                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35923            )),
35924            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35925            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35926            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35927            SCALED_PRESSURE_DATA::ID => {
35928                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35929            }
35930            SCALED_PRESSURE2_DATA::ID => {
35931                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35932            }
35933            SCALED_PRESSURE3_DATA::ID => {
35934                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35935            }
35936            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35937            SERVO_OUTPUT_RAW_DATA::ID => {
35938                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35939            }
35940            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35941            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35942                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35943            )),
35944            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35945                SET_ATTITUDE_TARGET_DATA::random(rng),
35946            )),
35947            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35948                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35949            )),
35950            SET_HOME_POSITION_DATA::ID => {
35951                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35952            }
35953            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35954            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35955                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35956            )),
35957            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35958                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35959            )),
35960            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35961            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35962                SMART_BATTERY_INFO_DATA::random(rng),
35963            )),
35964            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35965            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35966                STORAGE_INFORMATION_DATA::random(rng),
35967            )),
35968            SUPPORTED_TUNES_DATA::ID => {
35969                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35970            }
35971            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35972            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35973            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35974            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35975            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35976            TERRAIN_REQUEST_DATA::ID => {
35977                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35978            }
35979            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35980            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35981                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35982            )),
35983            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35984                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35985                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35986                ))
35987            }
35988            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35989                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35990                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35991                ))
35992            }
35993            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35994            UAVCAN_NODE_INFO_DATA::ID => {
35995                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35996            }
35997            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35998                UAVCAN_NODE_STATUS_DATA::random(rng),
35999            )),
36000            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36001                UTM_GLOBAL_POSITION_DATA::random(rng),
36002            )),
36003            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36004            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36005            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36006            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36007                VICON_POSITION_ESTIMATE_DATA::random(rng),
36008            )),
36009            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36010                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36011            )),
36012            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36013                VIDEO_STREAM_STATUS_DATA::random(rng),
36014            )),
36015            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36016                VISION_POSITION_ESTIMATE_DATA::random(rng),
36017            )),
36018            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36019                VISION_SPEED_ESTIMATE_DATA::random(rng),
36020            )),
36021            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36022            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36023            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36024            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36025            _ => None,
36026        }
36027    }
36028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36029        match self {
36030            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36031            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36032            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36033            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36034            Self::ALTITUDE(body) => body.ser(version, bytes),
36035            Self::ATTITUDE(body) => body.ser(version, bytes),
36036            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36037            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36038            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36039            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36040            Self::AUTH_KEY(body) => body.ser(version, bytes),
36041            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36042            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36043            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36044            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36045            Self::AVSS_DRONE_IMU(body) => body.ser(version, bytes),
36046            Self::AVSS_DRONE_OPERATION_MODE(body) => body.ser(version, bytes),
36047            Self::AVSS_DRONE_POSITION(body) => body.ser(version, bytes),
36048            Self::AVSS_PRS_SYS_STATUS(body) => body.ser(version, bytes),
36049            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36050            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36051            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36052            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36053            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36054            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36055            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36056            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36057            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36058            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36059            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36060            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36061            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36062            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36063            Self::CAN_FRAME(body) => body.ser(version, bytes),
36064            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36065            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36066            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36067            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36068            Self::COLLISION(body) => body.ser(version, bytes),
36069            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36070            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36071            Self::COMMAND_INT(body) => body.ser(version, bytes),
36072            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36073            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36074            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36075            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36076            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36077            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36078            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36079            Self::DATA_STREAM(body) => body.ser(version, bytes),
36080            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36081            Self::DEBUG(body) => body.ser(version, bytes),
36082            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36083            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36084            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36085            Self::EFI_STATUS(body) => body.ser(version, bytes),
36086            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36087            Self::ESC_INFO(body) => body.ser(version, bytes),
36088            Self::ESC_STATUS(body) => body.ser(version, bytes),
36089            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36090            Self::EVENT(body) => body.ser(version, bytes),
36091            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36092            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36093            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36094            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36095            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36096            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36097            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36098            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36099            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36100            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36101            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36102            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36103            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36104            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36105            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36106            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36107            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36108            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36109            Self::GPS2_RAW(body) => body.ser(version, bytes),
36110            Self::GPS2_RTK(body) => body.ser(version, bytes),
36111            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36112            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36113            Self::GPS_INPUT(body) => body.ser(version, bytes),
36114            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36115            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36116            Self::GPS_RTK(body) => body.ser(version, bytes),
36117            Self::GPS_STATUS(body) => body.ser(version, bytes),
36118            Self::HEARTBEAT(body) => body.ser(version, bytes),
36119            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36120            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36121            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36122            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36123            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36124            Self::HIL_GPS(body) => body.ser(version, bytes),
36125            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36126            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36127            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36128            Self::HIL_STATE(body) => body.ser(version, bytes),
36129            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36130            Self::HOME_POSITION(body) => body.ser(version, bytes),
36131            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36132            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36133            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36134            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36135            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36136            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36137            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36138            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36139            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36140            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36141            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36142            Self::LOG_DATA(body) => body.ser(version, bytes),
36143            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36144            Self::LOG_ERASE(body) => body.ser(version, bytes),
36145            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36146            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36147            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36148            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36149            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36150            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36151            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36152            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36153            Self::MISSION_ACK(body) => body.ser(version, bytes),
36154            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36155            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36156            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36157            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36158            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36159            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36160            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36161            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36162            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36163            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36164            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36165            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36166            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36167            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36168            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36169            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36170            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36171            Self::ODOMETRY(body) => body.ser(version, bytes),
36172            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36173            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36174            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36175            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36176            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36177            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36178            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36179            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36180            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36181            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36182            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36183            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36184            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36185            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36186            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36187            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36188            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36189            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36190            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36191            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36192            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36193            Self::PARAM_SET(body) => body.ser(version, bytes),
36194            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36195            Self::PING(body) => body.ser(version, bytes),
36196            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36197            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36198            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36199            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36200            Self::POWER_STATUS(body) => body.ser(version, bytes),
36201            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36202            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36203            Self::RAW_IMU(body) => body.ser(version, bytes),
36204            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36205            Self::RAW_RPM(body) => body.ser(version, bytes),
36206            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36207            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36208            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36209            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36210            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36211            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36212            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36213            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36214            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36215            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36216            Self::SCALED_IMU(body) => body.ser(version, bytes),
36217            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36218            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36219            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36220            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36221            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36222            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36223            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36224            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36225            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36226            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36227            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36228            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36229            Self::SET_MODE(body) => body.ser(version, bytes),
36230            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36231            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36232            Self::SIM_STATE(body) => body.ser(version, bytes),
36233            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36234            Self::STATUSTEXT(body) => body.ser(version, bytes),
36235            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36236            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36237            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36238            Self::SYS_STATUS(body) => body.ser(version, bytes),
36239            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36240            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36241            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36242            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36243            Self::TIMESYNC(body) => body.ser(version, bytes),
36244            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36245            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36246            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36247            Self::TUNNEL(body) => body.ser(version, bytes),
36248            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36249            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36250            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36251            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36252            Self::VFR_HUD(body) => body.ser(version, bytes),
36253            Self::VIBRATION(body) => body.ser(version, bytes),
36254            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36255            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36256            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36257            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36258            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36259            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36260            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36261            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36262            Self::WIND_COV(body) => body.ser(version, bytes),
36263        }
36264    }
36265    fn extra_crc(id: u32) -> u8 {
36266        match id {
36267            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36268            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36269            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36270            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36271            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36272            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36273            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36274            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36275            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36276            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36277            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36278            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36279                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36280            }
36281            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36282            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36283            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36284            AVSS_DRONE_IMU_DATA::ID => AVSS_DRONE_IMU_DATA::EXTRA_CRC,
36285            AVSS_DRONE_OPERATION_MODE_DATA::ID => AVSS_DRONE_OPERATION_MODE_DATA::EXTRA_CRC,
36286            AVSS_DRONE_POSITION_DATA::ID => AVSS_DRONE_POSITION_DATA::EXTRA_CRC,
36287            AVSS_PRS_SYS_STATUS_DATA::ID => AVSS_PRS_SYS_STATUS_DATA::EXTRA_CRC,
36288            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36289            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36290            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36291            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36292            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36293            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36294            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36295            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36296            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36297            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36298            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36299            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36300            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36301            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36302            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36303            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36304            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36305            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36306            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36307            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36308            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36309            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36310            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36311            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36312            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36313            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36314            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36315            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36316            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36317            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36318            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36319            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36320            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36321            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36322            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36323            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36324            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36325            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36326            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36327            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36328            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36329            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36330            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36331            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36332            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36333            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36334            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36335            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36336            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36337            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36338            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36339            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36340            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36341            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36342            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36343                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36344            }
36345            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36346            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36347            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36348            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36349            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36350                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36351            }
36352            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36353            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36354            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36355            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36356            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36357            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36358            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36359            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36360            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36361            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36362            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36363            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36364            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36365            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36366            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36367            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36368            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36369            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36370            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36371            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36372            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36373            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36374            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36375            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36376            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36377            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36378            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36379            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36380            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36381            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36382                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36383            }
36384            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36385            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36386            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36387            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36388            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36389            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36390            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36391            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36392            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36393            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36394            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36395            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36396            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36397            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36398            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36399            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36400            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36401            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36402            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36403            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36404            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36405            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36406            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36407            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36408            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36409            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36410            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36411            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36412            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36413            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36414            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36415            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36416            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36417            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36418            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36419            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36420            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36421            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36422            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36423            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36424            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36425            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36426            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36427            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36428            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36429            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36430            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36431            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36432            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36433            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36434            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36435            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36436            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36437            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36438            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36439            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36440            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36441            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36442            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36443            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36444            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36445            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36446            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36447            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36448            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36449            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36450            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36451            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36452            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36453            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36454            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36455            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36456            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36457            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36458            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36459            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36460            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36461            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36462            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36463            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36464            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36465            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36466            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36467            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36468            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36469            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36470            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36471            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36472            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36473            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36474            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36475            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36476                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36477            }
36478            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36479            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36480            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36481            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36482            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36483            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36484            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36485            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36486            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36487            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36488            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36489            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36490            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36491            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36492            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36493                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36494            }
36495            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36496                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36497            }
36498            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36499            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36500            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36501            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36502            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36503            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36504            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36505            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36506            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36507            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36508            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36509            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36510            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36511            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36512            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36513            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36514            _ => 0,
36515        }
36516    }
36517    fn target_system_id(&self) -> Option<u8> {
36518        match self {
36519            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36520            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36521            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36522            Self::CAN_FRAME(inner) => Some(inner.target_system),
36523            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36524            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36525            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36526            Self::COMMAND_INT(inner) => Some(inner.target_system),
36527            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36528            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36529            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36530            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36531            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36532            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36533            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36534            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36535            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36536            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36537            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36538            Self::LOG_ERASE(inner) => Some(inner.target_system),
36539            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36540            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36541            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36542            Self::MISSION_ACK(inner) => Some(inner.target_system),
36543            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36544            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36545            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36546            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36547            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36548            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36549            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36550            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36551            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36552            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36553            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36554            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36555            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36556            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36557            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36558            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36559            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36560            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36561            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36562            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36563            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36564            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36565            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36566            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36567            Self::PARAM_SET(inner) => Some(inner.target_system),
36568            Self::PING(inner) => Some(inner.target_system),
36569            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36570            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36571            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36572            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36573            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36574            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36575            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36576            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36577            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36578            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36579            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36580            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36581            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36582            Self::SET_MODE(inner) => Some(inner.target_system),
36583            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36584            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36585            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36586            Self::TIMESYNC(inner) => Some(inner.target_system),
36587            Self::TUNNEL(inner) => Some(inner.target_system),
36588            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36589            _ => None,
36590        }
36591    }
36592    fn target_component_id(&self) -> Option<u8> {
36593        match self {
36594            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36595            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36596            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36597            Self::CAN_FRAME(inner) => Some(inner.target_component),
36598            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36599            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36600            Self::COMMAND_INT(inner) => Some(inner.target_component),
36601            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36602            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36603            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36604            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36605            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36606            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36607            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36608            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36609            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36610            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36611            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36612            Self::LOG_ERASE(inner) => Some(inner.target_component),
36613            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36614            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36615            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36616            Self::MISSION_ACK(inner) => Some(inner.target_component),
36617            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36618            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36619            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36620            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36621            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36622            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36623            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36624            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36625            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36626            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36627            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36628            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36629            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36630            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36631            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36632            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36633            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36634            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36635            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36636            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36637            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36638            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36639            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36640            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36641            Self::PARAM_SET(inner) => Some(inner.target_component),
36642            Self::PING(inner) => Some(inner.target_component),
36643            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36644            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36645            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36646            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36647            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36648            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36649            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36650            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36651            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36652            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36653            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36654            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36655            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36656            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36657            Self::TIMESYNC(inner) => Some(inner.target_component),
36658            Self::TUNNEL(inner) => Some(inner.target_component),
36659            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36660            _ => None,
36661        }
36662    }
36663}